Former Sydney magistrate jailed for abuse