Add full-featured perl lib with tests

This PR is based off of the previously internal ToopherAPI perl module.  The code has been significantly cleaned up, and support is added for new API features.

Also, tests.