New closes PDO stuff

@FunPika - since this is your project, I thought I'd let you poke this.

It's only the very last commit that is new - the one before it is a merge from master :)

I renamed the database table so it fits in more nicely with the new PDO objects (I'd rather not be making views on new tables!).

I've swapped LogClass onto PDO DataObjects for EmailTemplate, to show you how easy it is to retrieve a specific row, although I've not come up with a nice way of adding arbitrary parameters to retrieve lots of objects yet (though I do have an idea).

There's more info about how it all works in an email I sent out, I just thought I'd point you in the right direction for this set of changes :)