Integrated Q-switched Nd:MgO:LiNbO3 waveguide laser