Re:17468 update in source comments and examples to AMD syntax

Updating the example for addOnUnload. Will do the other examples in this module next.