External inline parsers + PHP 5.4

# Rationale

This change bumps the minimum version to PHP 5.4 and moves most of the parsing behaviour out of `InlineParser` into traits. This will make it easier to maintain and test individual parsing behaviours.