Get the stack trace of the current or the given thread (#1)

The stack trace wasn't being generated properly. I wasn't taking the
current thread int oaccount when building it, so the main thread was
the one being used.

`stacktrace` now accepts the same parameters as `debug.traceback`

fixes #1