Fixed multiple db_api errors and resolved task 977

Task 977 required a special case for the route collision if the other route was
the default route (0.0.0.0/0).

The db_api errors was the lack of the scope parameter for most of the route
calls.