Code cleanup, better error handing, unittests and more examples

The code got some cleanup to be more consistent and provide an API more similar than that of existing extensions (ex. mysqli).

The more common errors are handled for connect, selectPool and write.

A additional file with UnitTests for the OO interface has been added.

Some more examples are added to show the uses as also a Readme.md file providing an overview of the examples.