De-duplicate property keys when upgrading from 1.9 to 2.1

1.9 allows duplicate property keys, and 2.x doesn't. So any upgrade
from 1.9 to 2.x needs to de-duplicate the property keys.
Also adds a check to refuse to start the database if there are
duplicate property keys (or relationship types, or labels).