NJ attorney general exceeded authority by taking over Paterson police, court finds