Two structural switches in HIV-1 capsid regulate capsid curvature and host factor binding