Update to run on Python 3.x

Simple compatibility layer in supervisor.py3compat.py allows use of long, basestring, unichr, raw_input and unicode.
Compatibility layer exports PY3 variable, print_function for fixing print statements, and as_bytes/as_strings functions for converting between Py3 bytes and strings where necessary.
Provide a supervisor.medusa.text_socket to automatically translate to bytes for send and back to str on receive.
Fix most print statements by simple adding parenthesis. Use print_function where that doesn't suffice.
Some syntax changes just to my PyLint happy like using +=.
Remove virtually all use of the string library and use the built-in str instead.
Replace string.atoi with int.
Enhance the __init__ method of most classes to call the super class __init__.
Replace many map and filter usages with list comprehensions.
Replace most cases of "container.has_key(key)" with "key in container".
Use io.StringIO instead of StringIO.StringIO for Py3.
Change raise syntax to Exception(msg) instead of Exception, msg.
Change "except Exception, e" to "except Exception" with e=sys.exc_info()[1] since that works on Py2.x and Py3 and change e[0] to e.args[0] since the former is no longer supported on Py3.
Change all local import statements to be fully qualified since local imports no longer work on Py3.
Implement __bool__, __lt__ and __contains__ where necessary to support sorting and 'in' usage on Py3.
Change all doc strings to use """ instead of ".
Remove unnecessary parenthesis to make PyLint happy.
Replace all tuple params with a single param, then explode later since expanding tuples in the function definition is removed in Py3.
Use string.ascii_letters instead of string.letters on Py3.
Replace apply with using the func directly.
Fix a few bugs in error handling exposed by PyLint.
Add a few methods and members to base classes to make PyLint happy.
Wrap many uses of dict.keys(), dict.items() and dict.values() in list() since they are generators on Py3.
Replace all octal values with decimal, plus a comment about what the octal value was. This really sucks but the format of octal values changed in Py3.
Get sys.maxint from sys.maxsize on Py3.
Replace assert_ and failUnless with assertTrue, failIf with assertFalse, assertEquals with assertEqual.
Add supervisor.read_file function to open a file as text, read the contents, and close the file. This avoids ResourceWarnings when running the tests.
Change the repr tests to look for a smaller fragment of the string since the repr output for classes has changed.
Add many close statements to avoid ResourceWarnings when running tests.
Comment out several unicode tests since the u'' form disappeared from Python 3.0 through Python 3.2.x.
Replace all back ticks with repr().
Change dispatchers and loggers a use super-class __init__ instead of doing the work again.
Add upgraded meld3 directly into the project so we don't need an external dependency for it.
Use '__func__' instead of 'im_func' on Py3.
Use sys.exc_info()[0] and sys.exc_info()[1] instead of sys.exc_type and sys.exc_value since those don't exist on Py3.
Remove dependency on meld3 and limit to Py2 in setup.py.
Start replacing select.select() for select.poll()
Move poll() logic to it's own class, and adapt Supervisor to use it.

Also fixing the poll() usage, my previous commit was registering all
file descriptors to all events, now register just on the expected events.
Remove select() method from Options class used by Supervisor
Ignores and unregisters closed file descriptors on poll()
Adjust log message to be more explicit
Handle POLLHUP on poll()
Add kqueue() support for poller
Add select() support for poller when no poll() or kqueue() is available. Make all tests pass for py>=2.5
Handle EBADF on kqueue poller backend
Use set instead of list for readables and writables on SelectPoller
Restore kqueue after daemonize because it's not inherited on fork()
Remove file descriptor from sets on unregister() for kqueue poller
merge scott maxwell\'s python 3 patches into master and fix tests
merge a few changes from pull requests into py3 branch from master
rename py3compat to compat, move adhoc conditional imports into compat and import from compat, remove from py3compat import * from all modules, remove local copy of meld3
Fix KeyError caused by removal 'name' in 6b3d647b2d50ffbefdcc5ef042f9a828188f83a0
The variable is used in line 1340 ("Increased %(name)s limit").
Parse env configuration in posix mode

Fixes #328

This allows (escaped) quotes in the values as well as empty
values.
.travis.yml: Add 3.2 and 3.3
Merge pull request #384 from msabramo/feature.py3.add_3.2_and_3.3_to_travis_yml

.travis.yml: Add 3.2 and 3.3