Full characterization of biphotons with a generalized quantum interferometer