Cleanup for #13160

This commit makes the changes from #13160 conform to the Salt way by
kreturning booleans for enable/disable. In addition, it makes the
following changes:

1. Adds versionadded directives

2. Fixes leaked file handles by using with statements (and
   salt.utils.fopen).

3. Raises a CommandExecutionError in ares where the failure of a
   function reaches an error case.