Miscellaneous fixes and improvements...

More graceful error handling, fix logic regarding timeout, registration of PHP functions for XSLT, some very simple DB optimization (hurray indexes!).

Supercedes https://github.com/discoverygarden/islandora_batch/pull/8.