Extract resource management in TimedStack

This makes TimedStack extendable for use by multiple connections.  For
multiple connections the resource managed is the number of file
descriptors used instead of the number of connections to a particular
service.

A subclass can use thread local variables to pass extra arguments down
without altering the calls which, while clumsy, is functional.
Pass options through TimedStack methods to hooks

This allows the hooks to do arbitrary things based on options (keyword
arguments) such as creating a particular type of connection based on,
say, connection_args.

The ** syntax for arbitrary options is not used as it is not supported
on ruby 1.9.
Restore 2.0 compatibility of TimedStack#pop

This also supports forward-compatibility through use of timeout as a
keyword argument.
Document TimedStack
Merge pull request #55 from drbrain/hooked_timed_stack

Extract resource management in TimedStack