Handle edge cases for script/style loading.

The edge cases handled are:
- Ensure switching names for an existing URL works.
- Ensure callbacks are transfered when switching names for existing URLs.
- Ensure switching URLs cancels previous callbacks.
- Ensure calling unload cancels previous callbacks.

Add tests for all of the above.

Closes #60.
nit: undefined name for consistency with other anonymous tests