UniqueQueue: add an `explicit_unsee` attribute.

In addition to the `silent` mode, add an `explicit_unsee` mode to UniqueQueue.

By default, `explicit_unsee` is False, and tems are unseen as soon as
they are popped from the queue.

The problem is that for certain applications, we want to keep the item
as seen until `task_done()` is called.  Since task_done doesn't take an
argument, we add a new function, `unsee(item)` to facilitate this
behavior.

Unittests updated to verify behavior.
Add some more strict execution controls around file tests

Maybe fixes #83;  replace the Mock we're using to wrap the stat results
with a NonCallableMock.  Explicitly call execute() before stat.  And
verify that stat is returning the proper results.
UniqueQueue should not dequeue work until after execute funishes

As-is, UniqueQueueTask doesn't play nicely with long-running execute
methods since queue.get() removes the object from the unique "seen" set
at dequeue time.  This diff refactors the Queue Task to do the
following:

- Enables `explicit_unsee` mode in UniqueQueueTask's UniqueQueue.
- Moves work completion handling scenarios (success, unhandled error,
and trylater) in QueueTask to separate functions, sharing a common `work_done`.
- Tracks whether the dequeued work was "raw" vs. already having an
ExecuteContext.
- Uses all of the above to appropriately "unsee" the work after execution,
even in the edge case where "TryLater" is thrown on "raw" dequeued work.
Fix captureWarnings build breakage

Copy captureWarnings from Python-2.7, to `sparts.compat`.  Use it if it's
not available in `logging`.

Fixes #84
Fail with more intuitive error message on py2.6 without unittest2

If you try to run py.test on py2.6 without unittest2, you'll get error
messages about missing SkipTest in the unittest module.

assert earlier and bail if unittest2 is not found in that scenario.
thrift.compiler: compatibility with fbthrift

fbthrift's compiler doesn't provide a -out flag.  It instead, provides a
legacy -o flag which inserts all the objects into a subdirectory named
gen-{blah}, where blah is the language (e.g., gen-py).

So, update the code to use -o and add paths relative to a gen-py
subdirectory.

Verified with both fbthrift and opensource thrift.

Note: one unittest still fails by default with fbthrift because the
generated python fb303 sources committed to sparts were built using
apache thrift, which is incompatible with fbthrift's python libraries.
Only require external `mock` for python < 3.3

In `sparts.deps` use `unittest.mock` for newer pythons.
Semi-revert of fb2e3ca79b768d6e87136b2b506d2d782de575ae

HAS_THRIFT (and `imp` in general) doesn't seem to play very nicely
with `setup()`-installed packages in python2.6.

Let's just use traditional imports for now instead.
More import hijinx

- For fb303 test, wrap the NBServer task with the ImportError check.
- Use __import__(module) instead of `imp` internals.
Assert check in ThriftClient on py26 with v6 IPs.

urlparse doesn't like URLs with IPv6 addresses in them prior to python
2.7.  Let's blow an assert with a meaningful error message instead of
an obtuse parse error.
Skip v6 addresses in fb303 unittest for python 2.6

We know this case is broken, so skip it.

This should finally fix the build.
install requires `futures` for py<3.2, not just tests.
fileutils: set_nonblocking

Add a helper function (and test) to set nonblocking mode on file
descriptors.
Add .travis-install to better handle conditional install instructions
Also port pre_install steps to .travis-pre-install.sh
SelectTask: Initial Prototype

Basically works, but not a fan of the lack of callback mechanisms
DeprecationWarning in assertEquals for <py3k unittests

This will make it impossible to write unittests that spew/fail in py3+
Use assertEqual in new unittest instead of assertEquals
Fix clowny unittest failure.

Python 2.6's ContextManager __exit__ doesn't always return values
of `exc_value` properly when raising from C extensions.  Let's patch
around it in the test for now.
Merge branch 'travis' into select