Cryo-EM structure of acylpeptide hydrolase reveals substrate selection by multimerization and a multi-state serine-protease triad