shell: minor: add diamonds to avoid warning in generated app code
factory: perf: improve performance of ServiceLoader factory machines loading

Cache results so that machines are instanciated only once per classloader.
Merge remote-tracking branch 'restx/master'