rules: explicitely set transaction atomicity

To speed up the update and ensure the a rule file has been
completely parsed at once, we use the transaction API of Django
to handle the updates linked with the parsing of a file in a single
transaction.