Change linux/ip_lib code to better handle address families
The code in linux/ip_lib doesn't handle IP address families
similarly amongst all its APIs. It also doesn't consistently
handle how it passes options and arguments along to /sbin/ip
So in the spirit of re-factoring, let's try and fix that:
1. Have the code determine the IP address family from its
arguments, given that it was passed an IP address.
2. Always follow an (options, command, arguments) style.
Options need a '-' prepended and go first, followed by the
command, and finally by any arguments.
3. In cases where we can't infer an address family but need
one it is now required (e.g. listing routes).
I also cleaned-up the IpRule class to fall in line with the
other classes.
Change-Id: Idcb9af698e3ea2d99a6a281c86fa13f51499b628
Closes-Bug: #
1419805