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 
Does this blow up if admin_password or admin_user is an array or object? I guess the JSON code will throw a runtime_error. Code that calls this has to catch it. As far as I can tell, these aren't validated anywhere else, nor is code prepared to catch if this throws.