Fix Issue 4847 - std.algorithm.topN documentation

Converted unittest into an example.