Partial Kiva code clean-up

This has turned into a somewhat more comprehensive refactor of basecore2d.  This PR includes:

* an ABC for `GraphicsContext`s,
* `basecore2d.GraphicsContext` is concrete subclass of the ABC
* factoring out `LineState` and `GraphicsState` from basecore2d
* modernization, pyflakes, PEP8 over the basecore2d codebase

There is probably some discussion needed about which methods should be in the ABC - there are some differences between those provided by the Agg backend and those provided by basecore2d.
Also, independent implementations (such as agg and QPainter) should at least `register()` with the ABC, but that is not done yet.
They're commented out because I'm not sure what the formal API should be - I started from this: https://github.com/enthought/enable/blob/master/docs/kiva/agg/interface.txt as the prototype interface for a GraphicsContext, but then had to comment out methods which weren't in certain backends.

So we need to make a decision - do we want this to be part of the ABC, and implement for each backend that they aren't implemented, or do we want them to be "extras" provided by some backends.

I left them commented out because I didn't want to break things, but because I think that we should implement the first option.