add '$distinct' and '$mapReduce' with tests

MapReduce is turned off by default, I use **allowJavaScriptQuery** as we discussed. $distinct does not use js at all. It's like a $count.