Add AbstractSpaceBeforeRule and move common logic into it

As [this](https://github.com/languagetool-org/languagetool/issues/182#issuecomment-56386712)