Make sure all arguments pub() passes to postMessage are structured-cloneable.

This avoids throwing an exception for code like 'catch(e) { pub("error", e); }'.
Merge pull request #368 from jyasskin/feature/pub-non-cloneable

Make sure all arguments pub() passes to postMessage are structured-cloneable.