SERVER-13184 Add simple logical rewrite+tests