Investigation of continuous-wave and Q-switched microchip laser characteristics of Yb:YAG ceramics and crystals