James McGuire, who was facing almost two dozen child-porn and bestiality charges, reaches a plea agreement