Check network vlan ranges for correctness.

Check that the range beginning and end tags are valid values 1-4094.
Supply two global constants for min/max vlan tags and update all
local usage of these values to use the global constants.

Fixes: Bug #1169266
Change-Id: I054a8bebd16d95ea40414e3cecb6d24a970c730f
Fix logic in api.v2.base.Controller._is_visible

Fix accessing yet unassigned local variable in case
exception is thrown.

fixes bug 1181718

Change-Id: Iea8f0cc252c1d2105cc696d917a347aa10b206a8
Merge "Check network vlan ranges for correctness."
Merge "Fix logic in api.v2.base.Controller._is_visible"