Compact, dual-configuration, single-frequency, Q-switched Nd:YAG laser