Nearly 500 police officers were either fired or reassigned on Wednesday, local news outlets said, part of what appears to be a purge related to a graft inquiry that has already ensnared many of the prime minister’s allies.