Master functional and proper formalism for quantum gauge field theory