Make sure handles aren't inherited by the child process.

Refs #6107
Properly shut down TLS streams.

Refs #6107
Implement support for the "package" keyword.

Refs #6107
API thingie (WIP).