SERVER-13769 geo_distinct.js: rewrite, add test cases
(cherry picked from commit 066ee29fd28a32b539d98737d2a20f8f9a0c5497)
SERVER-13769 QueryPlanner::plan() has to clear tags from query tree
(cherry picked from commit 8d48e785906d31dda3107a4a5a74ef940b4f2c89)