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.
This may just be a simple omission.