hy/lex/parser.py: Mungle (.foo? bar) a bit better

I have a class, to which I want to add an `is_foo` function, and would like to be able to call it from Hy like `(.foo? bar)`, these patch series make that happen. The series begins with refactoring, continues with tests, and adds the actual support for identifier-part mungling in the last one.

The sample code I'd love to have supported:

```clojure
(defclass Foo [object]
  [[foo? (fn [_] true)]])

(.foo? (Foo)) ;; => true
```