General Scattering Matrix for Design of Linear Coherent Networks using Microring Resonators