Resurrecting tools/aut2simulink.py from before the overhaul

by Robert Rogersten <robertr@live.se>, who committed it in
d2ff872cd4af273ac1d7c0e01d3fb3cdbe12528f
Add copyright notice for aut2simulink.py
CONTRIB: Improve style of aut2simulink.py
DOC TRIV
CONTRIB: Delete unused imports in aut2simulink.py
First draft export of controllers as Python class based on flat if-else

tulip.dumpsmach is introduced to gather routines for code generation.
DOC: include tulip.dumpsmach in API documentation
Merge branch 'master' into dumpsmach
DOC: Make title in docstr of tulip.dumpsmach more descriptive
TRIV: Delete unused imports in dumpsmach

These were vestigial from an early attempt to integrate the file
contrib/aut2simulink.py into tulip.dumpsmach.
TRIV: Delete trailing whitespace
DOC: tulip.dumpsmach.write_python_case()
Generated code from dumpsmach.python_case returns a dict

...of values of output variables, where the variable names are keys.
Previously a tuple of values was returned.
DOC: New section of the User's Guide about exporting controllers

In this commit, it only includes dumpsmach.python_case().  However,
the overall style is apparent in anticipation of adding new routines!
TRIV: Make long lines of code shorter in tulip.dumpsmach

PEP 8. Amen.
refactor dumpsmach.python_case

add:
- make start node a keyword argument
- explain howto in class docstring
- bugfix: deal with dead-end nodes

change:
- PEP 8: space between operators, continuation lines, operator last on line
- PEP 3101: use format, instead of adding strings (more readable, see also last "Note" here: http://docs.python-guide.org/en/latest/writing/structure/)
- format reduces repetition of tab multiples
- group strings together
- use `'` as string delimiter to reduce visual density and avoid the need to escape `"` in code generation containing strings
- use lists, instead of incremental string addition, because it is faster

- use itertools to generate the infinite sequence 'if', 'elif', 'elif', ...
- use cached generators (created on demand with an arg-less lambda)
- name local variables per (implicit) `networkx` conventions for local variables
- also naming as u, v, w is graph-theoretic and "state"-agnostic" (in
  anticipation of `transys` changes)
- use `dict.iteritems` instead of `dict.items` (automatic translation to
  python3 can handle this)
- use new-style class for machine
- mv common exception printing code to method, in order to avoid duplication (times the number of states, which can be very large). As a side-effect, the deepest indentation level is also reduced
- raise ValueError instead of Exception when given unexpected input values
add dumpsmach test for mimo systems

this test is independent of any other module or synthesis tool, depends only on networkx
doc: add bib ref and enforce pep8
Merge pull request #114 from tulip-control/dumpsmach

introduction of dumpsmach; the code generation function python_case