Improve lazy pirate

Also includes the beta6 branch. This works around the issue of unicorn workers re-using a context from the master process.