Fix bugs in resource tracking

* fixed res_tracker class where it was bumping an id before recording the original id.
* added a new col to the Resource table for the time a material object was created to assist in inventory calculation
* fixed a bug where transactions recorded transaction data AFTER sending resources to the receiving agent - potentially allowing the receiver to modify the resources before data were recorded.