Converted network subclasses to functions

In general, I think that the resulting functions are easier to read
than their networks subclass equivalents.

Of note is the pattern of accepting a premade network, or
making a new one if none is passed. This has a few concrete benefits.
One is that the BG / Thalamus doesn't need to accept label, seed,
and add_to_container arguments because if you want something other
than the default, you just quickly make a network with those values
and pass it in (this is done in `test_actionselection.py`).
Similarly, if you want to change something like the max firing rates,
you can make a new network, change the max firing rates in that
network's config, and it will just use them.

Other changes:
- Added the `nested` function to `nengo.utils.compat`. This is the
  only way we can do nested context managers in a way that works
  on Python 2.6 and above; if we don't support Python 2.6 then we
  don't have to include this function.