- Added context.detach_from_thread() and context.attach_to_thread()
- Enhanced error reporting to include file/line number in more
  circumstances.