Added function captiveportal_clean_dn_database to clean the captiveportaldn.rules file on startup

And other cosmetic change