[FIX] fixed access to non-existing elements during median computation
[FIX] fixed UniqueIdGenerator_test, derefenced end() iterator
Merge pull request #843 from aiche/fix/win-debug-mode-fixes

[FIX] fixes tests failing win debug mode