Create support function globals in parent context

When a global is created in a support function (i.e. setup/before_each),
create the global in the current block's parent context so that other
sibling blocks (i.e. 'it' blocks) can access these globals.

Globals created in 'it' blocks are still confined to the current
context/test, and not visible to it's siblings.

Fixes issues #289 and #302.
Cleanup suite start/end function signatures

The suite start/end published messages do not pass any parameters to
their subscribers. Therefore, the subscriber callback functions should
not receive any input parameters.
Fix issue #283 Run duration is always 0.0 seconds

The reported run duration is always 0.0 seconds. This occurs because the
terminal output handlers rely on the base output handler to record the
start and end times of the suite. However, when the terminal output
handler's suiteEnd() function runs, the base output handler's
baseSuiteEnd() function has yet to record the end time. Thus, the suite
end time is still 'nil' when the terminal output handlers are trying to
get the run duration, resulting in a 0 duration.

The solution is to ensure that the base output handler subscribes at the
highest priority so that the suite end time will be recorded before it
is needed by any other output handlers.
Fix issue #250 Weird context popping

At the end of a test suite the last context is popped off the stack
leaving it empty. However, this doesn't seem to be intended as there are
an equal number of pushes/pops. This error occurs because the context
pushes/pops are not done with a stack, but rather relies on the context
parent/child relationships.

Use a stack to properly keep track of context pushes/pops.
Save/Restore global state between test files

When a file context is pushed, save a copy of _G and package.loaded.
Then when the file context is popped, restore the saved values of _G and
package.loaded. This prevents a 'require' in one file from polluting the
global environment of another file. This also allows modules that are
required in one test file to be reloaded in another test file.

This addresses issue #62.
Fix issue #272 Syntactic sugar does not work

Allow the following alternate syntax for context blocks:
  describe "something" (function()
    it "works" (function()
      assert(true)
    end)
  end)
Fix error message for table error objects

When throwing a table as an error, the error message reads 'Nil error',
which is confusing because an error object was thrown. The error message
should at least display that a table was thrown.

Restore the previous behavior of printing out the error table.

Issue #284.
Fix issue #284 Error reporting is inconsistent

Errors are reported differently depending on the type of error message:
  $ busted testcase_spec.lua
  ●●●
  0 successes / 3 failures / 0 errors / 0 pending : 0.0 seconds

  Failure → ./testcase_spec.lua @ 10
  testcase fails with table error
  {
  }

  Failure → ./testcase_spec.lua @ 6
  testcase fails with no error
  Nil error

  Failure → ./testcase_spec.lua @ 2
  testcase fails with string error
  ./testcase_spec.lua:3: error message

Update error reporting to display the file and line information for
non-string error types. So the above now displays as the following:
  $ busted testcase_spec.lua
  ●●●
  0 successes / 3 failures / 0 errors / 0 pending : 0.0 seconds

  Failure → ./testcase_spec.lua @ 10
  testcase fails with table error
  ./testcase_spec.lua:11: {
  }

  Failure → ./testcase_spec.lua @ 6
  testcase fails with no error
  ./testcase_spec.lua:7: Nil error

  Failure → ./testcase_spec.lua @ 2
  testcase fails with string error
  ./testcase_spec.lua:3: error message
Issue #284 Refactor error reporting

Refactor error reporting to have Lua insert file and line into the error
message.
Fix getfenv/setfenv for Lua 5.2 compatibility

It is possible for getfenv to return nil for a function with no globals.

Use unique upvalue for setfenv.
Fix issue #313 Failure line numbers in moonscript

Fix moonscript file loader
- Fix error message parsing and rewriting
- Fix traceback parsing and rewriting
- Fix file line number lookup
- Fix error message for file loading errors
Fix error message for terra test files
Remove unnecessary tail call

Remove tail call in busted.execute() so that the stack trace shows more
information. The function passed to busted.safe() does not need to
return anything, so just remove the 'return' keyword.
Remove unnecessary requires in output handlers
Display error dots on file/describe failure
Fix junit output for file errors
Fix TAP output to show errors

TAP output was only showing success and failure results, but not errors.
So update TAP output to show errors as "not ok", just like failures.
Fix tests not running in parent directories

Error in pl.path.normpath causes leading '../' directories to be
stripped from a file path. This, in turn, prevents busted from finding
any files located in parent/ancestor directories.

Implement a fixed version of normpath and use it instead of
pl.path.normpath.
Fix help string for the default seed value
Add shuffle commandline flag (alias for randomize)