BUG-731: simplify CommunitiesParser

We can unify some parts of into common codepaths, so let's do it.

Change-Id: I1e9acba475b5b35e5aba670937776ee9d5e9c236
Signed-off-by: Robert Varga <rovarga@cisco.com>