Generalized Quantum Theory And Mathematical Foundations Of Quantum Field Theory