Implemented proxy-list shuffle optimization and added associated tests.

Changed this in the master branch.