Make functional tests a library

Convert functional tests so that they can be run from any platform. The tests are defined slightly differently, such that a TestHarness instance provides the functionality of creating mock data, reading and writing files, and executing commands.

Implementors of new platforms would create something similar to `pigpen.pig.functional-test`. I'll be adding a version that generates a pig script, runs it using pig, and reads the output.

@pkozikow - Let me know if you think this will work for cascading.

cc @daveray @mapstrchakra