Refactored post model to reduce duplication in validator methods

Introduced several private methods to reduce duplication in the methods responsible for validating mentions, images and links.