Fix __setattr__()

In new-style classes the base class __setattr__() has to be called
instead of inserting the value into self.__dict__.

See http://docs.python.org/2/reference/datamodel.html#customizing-attribute-access
Change argument for open mode to 'r'/'w'/'rw'
Change file type handling
Change order of SoundFile constructor arguments

Moving 'mode' right after 'name' and 'format' after 'subtype' and 'endian'.
This way most situations can be handled with positional arguments only, e.g.:

f1 = SoundFile('file1.wav')
f2 = SoundFile('file2.wav', 'rw')
f3 = SoundFile('file3.wav', 'w', 48000, 1, sf.PCM_24)
Improve file type handling for raw files

... and set default channels=None
Change frames=-1 to frames=None
Add open() function
Add read() function
WIP write()