Coupled bloch-wave analysis of active PhC waveguides and cavities