Mechanism of recruitment and activation of the endosome-associated deubiquitinase AMSH.