luci-base: fix tab handling in modal dialogues
When adding tabs in modal dialogues, the old code of simply assigning
s.tabs = this.tabs was problematic because it was an array of objects
whose behaviour would cause a traceback when s.tab is called in e.g.
a protocol handler Modal when it was reopened.
Now verify the properties do not already exist before assigning them.
This means one can define s.tab(...) in a Modal UI without a try
block (which would even then sometimes fail).
Signed-off-by: Paul Donald <newtwen+github@gmail.com>