Unduplicated the duplicate and remove objects actions

Also shared the implementation of moveObjectsToGroup by moving that
function into MapDocument.