Autoload using Composer and OO refactoring

In order to use Picatcha in a Symfony2 project, I've done some refactoring to use classes instead of functions. 

Side note: this code requires PHP 5.3 and assumes PHP's JSON extension is available. If you choose to accept this pull request, you would have to edit composer.json to rename the project and add your license, contact information, etc.

The whole thing might not fit with your vision or your requirements but since I did it, I thought I might as well share it and contribute back to your project.