Demolishing the family homes of Palestinians suspected of carrying out attacks on Israelis amounts to collective punishment - a war crime, the rights group says.