Compile examples and fix test cases

* Examples are now compiled (but not installed) to maintain API
  compatibility
* Statement test cases hung with no MySQL server due to not testing the
  initial poll loop for errors

Fixes #99 
Closes #97