Fixes #6560 - Extract puppet parsing logic

Thank you for review. The methods are mandatory.

> Are all these methods mandatory (probably should be)? If so: we either a need a test that verifies that all classes that inherit from FactParser implement these methods, or do a runtime check (perhaps during instantiation?) that verifies that the interface is satisfied. 

These raises are defensive for developers so they know what they have done wrong. Runtime check would slow down processing every single time just because of developer convenience. Having a test could do the trick but it would be very fragile (hardcoded for every subclass) or complex (metaprogramming) which introduces risk of errors in tests themselves.

> Personally, I am strongly against this pattern (thowing exception when a method is not implemented), as you no longer can safely replace one interface implementation with another (violates Liskov substitution principle). Moreover, validation as above (or similar) would be more reliable (and less verbose).

According to Liskov substitution principle, we should be able to use subtype instead of a type. How is this broken by these methods? You can (and actually must) use subtype (PuppetFactParser) which implements the same interface.