fix for xpath, uses ClassName and Instance instead of Index

Not fully cleaned up yet, but I wanted to check with @bootstraponline that this implementation will do what we want.

Passes the appium xpath tests, and the sample test from #2598 (for Notes.apk), but I know that there's a better test suite in the ruby lib.

Here, like in @bootstraponline's code, we have an `instance` attribute for each tag, which increments on a class by class basis.

I'm nervous that this may still cause problems for users trying to get elements of the same class as elements which get removed by the hierarchy compression. Like if a user were looking for a LinearLayout.... thoughts?