SHARP – III. First use of adaptive-optics imaging to constrain cosmology with gravitational lens time delays