reindexed the tests in t/036-sub.t.
added tests for using the ngx. API functions in the user callback functions for ngx.re.gsub's replacement. these tests exposed a bug in lua-resty-core.