Have common routines for V4 and V6 route management
Closes bug:1380509

Change-Id: I73d815229fab9c1a179499d76c8825aa7a339d04
(cherry picked from commit da0a1d7ef3c842ed8a794326e706cfa45ceb6fb3)