Replace type(value) with isinstance().

This should now work for unicode strings and things like
numpy.float64().
Using a different approach for _bool()

The approach in previous changeset (37a5d9c) didn't
work for things like numpy.float32 or numpy.int32.
This one is easier and more general.
Correct string representation of long event types.

This is done by:
1. Introducing a "force_one_line" option for AbstractEventType.__str__()
2. Calling self.__str__() with that option in AbstractEventType.__repr__()
use flake/pep8 default configuration
use with statement
Merge pull request #668 from claudiodsf/repr

Correct string representation of long event types.
Merge remote-tracking branch 'upstream/master' into mchedr