apidb: Support importing negative ids

The existing codebase was assuming that all entity ids were positive.
This patch allows ids to be positive or negative (or zero).
apidb: Fix one-off error in current way/relation loading

The previous patch had a minor bug where the minimum way and relation
ids being loaded into the current tables were one-off and therefore
missing the first id to be loaded.