LP#1058321: Possible to receive a pending purchase order

Restrict 'Mark purchase order as received' to on-order state
purchase orders, and 'Un-Receive Purchase Order' to 'received'
POs. Otherwise inconsistencies easily occur ...

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
LP#1058321: Acq: Possible to receive a pending purchase order

Revised to allow a cancelled PO to be received, as this is needed under
certain conditions (note - bib/items are not restored in this case).
Added po_state variable to avoid repeated PO.state() function invocations.

Signed-off-by: Mark Cooper <markchristophercooper@gmail.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>