Import class at top level.
Use OrderedDict in scan op to try to fix schochastic opt order problem.
more OrderedDict
more OrderedDict.
Don't warn for dict of size 1.

This was creating warning in the tests.
Merge pull request #1254 from nouiz/StochasticOrder_Scan

Try to fix Stochastic order scan by using OrderedDict more often.