Add version check.

Check the API version before every call so we don't break something if a
backward-incompatible change is introduced.
Rewrite updateros.py to use EncapEntry objects instead of (dstaddress, gateway) tuples.