An adaptive optics upgrade for the Automated Planet Finder Telescope using an adaptive secondary mirror