Add support for command factories

Command factories are used to create commands from file paths.
Until now command creation was hard coded to support native and
.net executables. Now it is possible to register factory classes which
can create command objects for arbitrary file types.