SERVER-5504 Allow map-reduce jobs to run on replicas, provided the output is into the "local" database

This patch allows for running map-reduce jobs on a secondary server in a replica set, provided that we are outputting into the local database.  In order to make this work I also had to make the renameCollection command work for local -> local renames.

PS: Should JIRA issues be opened for all pull requests?