Fix activity name parsing #3758

Fixed Appium [issue 3758](https://github.com/appium/appium/issues/3758).  Code failed to account for cases where package and activity namespaces overlap but do not match, eg "com.foo.bar/com.foo.barf.WuTang".