Nonlinear Control Allocation: A Learning Based Approach