Extract Language.find_by_extension

This doesn't change any behavior, but just exposes a public method for `Language.find_by_extension`.

/cc @aroben #1675
I made the API work even if you don't specify a dot.