rules: improve code factorization

We define update_ruleset depending on the method used.
rules: add support for uploaded ruleset

This is work in progress. The form needs to be updated to hide
fields following the method of the Source.
rules: add delete Source operation

It is now possible to delete a Source object from the interface.
rules: fix edit of ruleset with multiple sources

It was not possible to edit the categories of a ruleset using
multiple categories. Editing one category was resulting in flushing
the other.
rules: implement fields hiding in 'add source'

This patch uses jquery to implement a mechanism displaying or hiding
fileds of the form based on the method chosen.
rules: add unwanted field during Source edit.