Recognize platform line for node-Tor relays

We have a few relays in the wild running node-Tor, a JS counterpart for tor...

  https://github.com/Ayms/node-Tor

These relays have a 'node-' prefix on their platform lines. For instance...

  'platform node-Tor 0.1.0 on Linux x86_64'
  https://atlas.torproject.org/#details/E0671CF9CB593F27CD389CD4DD819BF9448EA834

Caught by sysrqb on...

  https://trac.torproject.org/11008
Tutorial section for determining the exit you're using

Neat idea from Arturo for a tutorial section showing users how to determine the
exit node they're using at a given time.
Controller methods get_ports() and get_listeners()

Determining tor's control or socks port was once as simple as...

  GETCONF ControlPort

However, tor has expanded its config options so these often provide more
information than just the port number.

Back in commit 3a2875f Sean added a get_socks_listeners() method that uses
'GETINFO net/listeners/socks' to determine tor's socks port, and falls back on
config options if that's unavailable.

This change deprecates get_socks_listeners() in favor of more generic
get_ports() and get_listeners() methods. The get_listeners() behaves like
get_socks_listeners() but for several listener types, while get_ports()
provides just the port numbers for local connections.
Support for HS_DESC events

Adding support for tor's now HS_DESC events...

  https://gitweb.torproject.org/torspec.git/commitdiff/a67ac4d
  https://trac.torproject.org/10807
Don't cite features as coming in '1.1.0-dev'

I've been inconsistent when mentioning when features are introduced. Sometimes
I say '1.1.0-dev' while elsewhere I say '1.2.0'. The theory on the former was
that the '-dev' suffix would mean 'unreleased things'. However, we know what
the next version is gonna be so we might as well just say that.
Noting when HS_DESC support was added

Oops, forgot to note when we added HS_DESC event support. Spotted by wfn.
Adding HS_DIR to the EventType enum

Oops, we documented HS_DIR but didn't actually include it in the enum. Spotted
by wfn. Also sorting the enum to make it match the docs.
EventType mistakenly listed HS_DIR rather then HS_DESC

Oops. Another mistake spotted by wfn.
Don't use @lru_cache for exit policy rules

Lession learned today: @lru_cache is handy for efficiency but don't rely on the
cache to function.

Our ExitPolicy class expected its _get_rules() method to be called exactly once
due to having cached results. However, pickling then unpicking an ExitPolicy
class caused our @lru_cache to be cleared, resulting in a TypeError.

Replacing this method's @lru_cache with a standard one, and adding a test for
pickleability. Thanks to Nicholas Hopper for the catch!
Lowering logging about undelivered messages to the info level

Our BaseController's test_msg_repeatedly integ test hammers the holy bejezus
out of our controller socket in the hope of triggering exotic concurrency
issues that might lead to issues like deadlock. This has been an impressively
great test at ferreting out exotic issues and this is no different. Our Jenkins
tests frequently log...

  03/12/2014 15:37:57 [NOTICE] BUG: the msg() function failed to deliver a
    response: Authentication required.

After a couple hours of looking into this I gotta admit that I'm frustrated by
the delicacy of our message handling. It works great in practice, but in theory
issues such as socket errors or edge cases can cause undelivered messages.

In this case rapidly connecting and closing the socket while simultaneously
communicating on it causes the socket's recv() to occasionally raise
exceptions. These exceptions are reported to callers, leaving enqueued messages
that end up being undelivered (logging this notice).

After much head scratching and digging into our socket class I've come to the
realization that this is about as good as it's gonna get. If we use our recv
queue to communicate *both* messages and exceptions then it is to be expected
that exceptions can sometimes result in undelivered messages.

Lowering the severity of the log message appropriately.
Merge branch 'master' of git://gitweb.torproject.org/stem