Add db constraint for node attribute

Add functionality to the INSERT/UPDATE trigger on the ip_net_plan table
to make sure that the node column can only be set for prefixes of type
host or prefixes of type assignment and with a prefix length of /32 (for
IPv4) or /128 (for IPv6).

Part of #269.