sudorule: Allow using hostmasks for setting allowed hosts

Adds a new --hostmasks option to sudorule-add-host and sudorule-remove-host
commands, which allows setting a range of hosts specified by a hostmask.

https://fedorahosted.org/freeipa/ticket/4274
sudorule: Allow using external groups as groups of runAsUsers

Adds a new attribute ipaSudoRunAsExtUserGroup and corresponding hooks
sudorule plugin.

https://fedorahosted.org/freeipa/ticket/4263
sudorule: Make sure sudoRunAsGroup is dereferencing the correct attribute

Makes sure we dereference the correct attribute. Also adds object class
checking.

https://fedorahosted.org/freeipa/ticket/4324
sudorule: Include externalhost and ipasudorunasextgroup in the list of default attributes

The following attributes were missing from the list of default attributes:

* externalhost
* ipasudorunasextuser
* ipasudorunasextgroup
sudorule: Allow adding deny commands when command category set to ALL

https://fedorahosted.org/freeipa/ticket/4340
sudorule: Make sure all the relevant attributes are checked when setting category to ALL

https://fedorahosted.org/freeipa/ticket/4341
sudorule: Fix the order of the parameters to have less chaotic output
sudorule: Enforce category ALL checks on dirsrv level

https://fedorahosted.org/freeipa/ticket/4341
ipatests: test_sudo: Add tests for allowing hosts via hostmasks
ipatests: test_sudo: Add coverage for external entries

Covers functionality of external entries for:
* users
* runAsUsers
* groups of RunAsUsers
* runAsGroups
ipatests: test_sudo: Add coverage for category ALL validation

Makes sure sudorules behave correctly both when adding new entries
with corresponding category set to ALL, and when setting the
category to all when corresponding entries exist.

The only exception of deny commands with cmdcategory ALL is
covered as well.
ipatests: test_sudo: Fix assertions not assuming runasgroupcat set to ALL
ipatests: test_sudo: Do not expect enumeration of runasuser groups
ipatests: test_sudo: Expect root listed out if no RunAsUser available
sudorule: Refactor add and remove external_post_callback