moved from mysql to PDO

completly reworked database layer
make use of new global $conn in functions
moved from mysql to PDO

completly reworked database layer
make use of new global $conn in functions
merged back to master branch

resolved all conflicts
fixed to small bugs introduced while merging
fixed some more bugs introduced while merging

hopefully everything is working now
Merge pull request #8 from swiffer/master

merged this tentavely for 1.0 
will require further testing, though