South African police detain 900 in immigration protests