addressing multiple windows issues

  * #490 - use unique_ptr and roll our own swap
  * #491 - use C++11 random uniform distribution on the range of indices
Merge pull request #493 from chambbj/issues/490-win-constant-expression

addressing multiple windows issues