Adding database server code

The stats_buffer is now pushed to the server and the POST method then
pushes the data to the database.