Refactored jsonpointer.py, added tox.ini

And fixed most of flake8 errors(except 'lines too long' errors where its ok)
I would review this pr not unified :)
Hope it helps!
I added a test but because of a poor branch managment, it ended up in the second pr, I'm very sorry, I'll submit it as a seperate pr.