py: Remove IOError since it's deprecated; use OSError instead.

In CPython IOError (and EnvironmentError) is deprecated and aliased to
OSError.  All modules that used to raise IOError now raise OSError (or a
derived exception).

In Micro Python we never used IOError (except 1 place, incorrectly) and
so don't need to keep it.

See http://legacy.python.org/dev/peps/pep-3151/ for background.
stmhal: For spi_init, add argument to select if NSS pin is enabled.

Most of the time you don't use the NSS pin of the SPI bus, and so it
shouldn't be enabled by default (this gave some bugs in the past).
stmhal: Add network and usocket module.

As per issue #876, the network module is used to configure NICs
(hardware modules) and configure routing.  The usocket module is
supposed to implement the normal Python socket module and selects the
underlying NIC using routing logic.

Right now the routing logic is brain dead: first-initialised,
first-used.  And the routing table is just a list of registered NICs.

cc3k and wiznet5k work, but not at the same time due to C name clashes
(to be fixed).

Note that the usocket module has alias socket, so that one can import
socket and it works as normal.  But you can also override socket with
your own module, using usocket at the backend.
drivers, wiznet5k: Wrap exported functions in a macro for renaming.

3rd party drivers should not export generic names like "close".
drivers, cc3000: Wrap exported functions in a macro for renaming.
stmhal: Fix wiznet5k init of SPI bus.
stmhal: Enable patch_program in cc3k driver, with key.
tools: Add network build to auto-build script.
unix: When specifying a file as argument pass absolute file path to lexer

This fixes an inconvenient inconsistency when passing a relative path as argument:
the argument was passed to the lexer as-is resulting in __file__ being equal to
the original path passed in.
All other occurrences of __file__ (when using import) however use the fully
resolved absolute path.

Also renamed basedir to filepath since that reflects what it is, and renamed p to basedir in turn.