util: Add ni_try_mlock()

ni_try_mlock() checks for errno. It accepts EPERM error to continue,
when user is not allowed to lock memory.
wireless: mlock the network structure
wireless: catch failing network object allocation