WIP Uniport tests

Started on these a few months back, but then progress stalled. I'm not happy with the state of the current javascript tests, however they did help uncover some weird inconsistencies. 

I've talked with integration people, and they agree, that if a port is specified as `admin=no` that that setting should be honoured, regardless of any ip white list. 

This patch includes some C++ code, and different logic, that requires some C++ devs to audit. 

@JoelKatz 
@vinniefalco 
I'd suggest either verifying that they're strings or putting the try/catch block right in this code.