Uppercase all module globals for consistency
Allow for testing single files with TEST_FILE env var.
Added support for trailers and test
Use local log and debug.
Changed api to accomodate set_timeout like other cosocket resty modules