Remove dependancy on tr1/random

fixes #3079
Fix module path search

Now, HOOMD only looks for the module path in the source dir when the
executable is run out of the binary dir. And it only looks in the install
dir when it is not run out of the binary dir.
Handle images correctly in analyze.msd

fixes #3088
Merge branch 'maint'