preliminary implementation for a mysql storage module

it's pretty much working ... but it needs polishing and some more error checking