Add support for selecting pin alternate functions from python.

Converts generted pins to use qstrs instead of string pointers.

This patch also adds the following functions:
pyb.Pin.names()
pyb.Pin.af_list()
pyb.Pin.gpio()

dir(pyb.Pin.board) and dir(pyb.Pin.cpu) also produce useful results.

pyb.Pin now takes kw args.

pyb.Pin.__str__ now prints more useful information about the pin
configuration.

I found the following functions in my boot.py to be useful:
```python
def pins():
    for pin_name in dir(pyb.Pin.board):
        pin = pyb.Pin(pin_name)
        print('{:10s} {:s}'.format(pin_name, str(pin)))

def af():
    for pin_name in dir(pyb.Pin.board):
        pin = pyb.Pin(pin_name)
        print('{:10s} {:s}'.format(pin_name, str(pin.af_list())))
```
Merge branch 'pin-af' of https://github.com/dhylands/micropython into dhylands-pin-af
stmhal: Comment out unused functions.
stmhal: Fix documentation; remove ability to specify af by str.
stmhal/teensy: Use _ instead of - in source file names.

Trying to move towards consistency, let's use _ exclusively in names of
source files (eg .c, .h, .csv).
tests, pyb: Update pin test.
Merge branch 'dhylands-pin-af'
tools, gendoc: Allow constants at module level; gen module index.

Addresses some issues from #585.
stmhal: Start of documentation for modos and modtime.
tools, gendoc: Put module TOC/index in module/ directory.
stmhal, pin: Simplify default value for alternate function init.
stmhal, pin: Save 140 bytes ROM by simplifying pin_print function.
moductypes: Remove debug inclusion of stdio.h .
py: mp_buffer_info_t::buf may be valid, but NULL for empty objects.

This happens for example for zero-size arrays. As .get_buffer() method now
has explicit return value, it's enough to distinguish success vs failure
of getting buffer.
objarray: Implement equality testing between arrays and other buffers.
modsocket: .recv() returns bytes object.