hy/lex/parser.py: Move most of the identifier mangling into a def

As a refactoring step, move the identifier mangling done in t_identifier
into a separate def.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests/lex/test_lex.py: Add a few tests to cover identifier mangling

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
hy/lex/parser.py: Add support for sub-object mangling

With this patch, every identifier is split up along dots, each part gets
separately mangled, and then it is all joined back together. This allows
for fun stuff like (.foo? (Foo)), and even more contrived examples.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Merge branch 'master' into pr/438