Structural and Functional Characterization of the Endosome-associated Deubiquitinating Enzyme AMSH