Add some javascript for improved UI in the new_rule.html template

This branch adds some minimal JS in the new_rule.html to do:
 - if the user selects a stock port, auto add ths to the "port" text input
 - when the user manually selects a port, reset the stock_port