MULE-7865 - adding oauth 2.0 authorization code grant type support

Turn this into a proper object that encapsulates the running state, instead of a couple of methods reciveing a state and returning it updated.