shell, NM Model: Allow both netmask and prefix for IPv4 addresses and routes.

Fixes #1181