Miniature CW and active internally Q-switched Nd:MgO:LiNbO3lasers