High-Q microcavities as multifunctional elements for chip-scale nonlinear and quantum optics