extended the delivery API to work with all delivery states defined by the transport spec as well as custom delivery states. This addresses PROTON-97 and the C portion of PROTON-75