Foreign keys

Creates foreign keys for all tables except ways before the topology is created. When the topology is created primary key and foreign keys are added to the ways table, as so foreign keys in other tables referencing ways.

Still missing a foreign for the way_id field in the relations_way table. Not yet clear what is this field is supposed to be referencing.