Added detection for ambiguous extensions + heuristics

Polyglot now identifies if more than one language was found for the same
extension.
Changed the languages.yml to be simpler and therefore some code in
Polyglot also got simpler.
Also added a simple heuristics file to disambiguate between Perl and
Prolog files using basic syntax bits.