Add back the newClassLoader hook in SymbolLoaders.

This was previously an overridable method of Platform.
The loader creation was moved in
afbee09c8e0e7b1a4da1f8517c723dad9f1adb6f directly in
SymbolLoaders, but inside a method doing more logic,
namely initializeFromClassPath().

This commit simply moves the actual creation of the
class loader (`new ClassfileLoader(bin)`) into its
own method `newClassLoader`, but in SymbolLoaders.
This allows to override only that method in subclasses
of SymbolLoaders.
Move logic checking valid names from ClassPath to ClassPathContext

Other methods taking the same kind of decisions were already
in ClassPathContext, e.g., isValidName() or, in some sense,
even toBinaryName().

This makes ClassPath itself be completely agnostic of how
particular kinds of files or directories are named.

It also allows to override this logic at the context level.
Without it, overriding this logic required a fair amount of
code duplication from ClassPath.
Merge pull request #2963 from sjrd/topic/hooks-for-scala-js

Small refactorings giving hooks for Scala.js