Big update to the stats gathering code ...
This change attempts to make the stats gathering code more reliable by not relying on the testbed_stats records to reconstruct usage statistics. The main source of errors and total confusion in the current stats code is that testbed_stats includes all the errors and transitions, from which I have to reconstruct what happened in order to determine usage by a project or user. The new stats code still generates the testbed_stats code, but actual usage is recorded as it happens, in the experiment_resources table, as swapins, swapouts, and swapmods occur. Its also much faster to compute the data for the tables in the web interface, not having to scan a zillion testbed_stats records in php. There is a time consuming update to the records that takes place with a lot of tables locked.