Added garbageCollect to timeout.js

When using timeout, it may be useful to have a function that is called when the timeout occurs to cleanup any variables, instances, etc before the reject call is run.

Example use case:
A WebSocket is created and a promise for a connection is returned.
However, the timeout has occurred before a connection was opened, and the garbageCollect callback can delete the WebSocket instance.