ENH: allow duplicate column names if they are not merged upon
Currently merge columns are not automatically inferred when there are duplicate column names. Instead a `MergeError` is raised. This pull request enables merging with duplicate column names as long as they are not merged upon.

```
df = DataFrame({'key': [1, 2, 3],
                'v1': [4, 5, 6],
                'v2': [7, 8, 9]})
df.columns = ['key', 'foo', 'foo']
df2 = DataFrame({'key': [1, 2, 3],
                'v1': [4, 5, 6],
                'v2': [7, 8, 9]})
df2.columns = ['key', 'bar', 'bar']

# worked before
merge(df, df2, on=['key'])
# now works as well since 'foo' and 'bar' don't interfere
merge(df, df2)
```

If the common cols are not unique a `MergeError` is still raised as in #2649
