Phase diagram of multiferroic KCu$_3$As$_2$O$_7$(OD)$_3$