DB: remove unused realm parameter from sysdb_master_domain_add_info

The parameter was not used at all.
LDAP: Add enum_{users,groups}_recv to follow the tevent_req style

The enum code was quite old and predated the tevent_req style. In
particular, the enum code was checking tevent state direcly and not
using _recv functions or the helper macros we added later.
As a consequence, it was not easy to read. This patch adds the standard
_recv functions to read the status of the enum requests.
LDAP: Remove unused constant

The constant was not used since Euegene came up with his reconnection
logic.
LDAP: Move the ldap enum request to its own reusable module

The LDAP enumeration was too closely tied to the LDAP identity provider.
Because some providers might need special handling such as refresh the
master domain record before proceeding with the enumeration itself, this
patch splits the request itself to a separate async request and lets the
ldap_id_enum.c module only configure this new request.

Also move the enum timestamp to sdap_domain to make the enum tracking
per sdap domain. The cleanup timestamp will be moved in another patch.
LDAP: Convert enumeration to the ptask API

https://fedorahosted.org/sssd/ticket/1942

Identity providers other than LDAP need to customize the enumeration in
different ways while sharing the way the task is scheduled etc. The
easiest way to accomplish it is to leverage the recently introduced
ptask framework.
LDAP: Make cleanup synchronous

The LDAP cleanup request was asynchronous for no good reason, probably a
leftover from the days of async sysdb. This patch makes it sychronous
again, removing a lot of uneeded code.
LDAP: Make the cleanup task reusable for subdomains

Instead of always performing the cleanup on the main domain, the task
now accepts a sdap_domain structure to perform the cleanup on. This
change will make the cleanup task reusable for subdomains.
LDAP: Make sdap_id_setup_tasks reusable for subdomains

Instead of always performing the setup for the main domain, the setup
can now be performed for subdomains as well.
SYSDB: Store enumerate flag for subdomain
Read enumerate state for subdomains from cache

The enumerate flag will be read from the cache for subdomains and
the domain object will be created accordingly.
Add a new option to control subdomain enumeration
IPA: enable enumeration if parent domain enumerates in server mode

https://fedorahosted.org/sssd/ticket/1963
NSS: Descend into subdomains if enumerate=true

Since we now store the enumerate flag in sysdb for subdomains, we can
always descend to all available subdomains and if they do not allow
enumeration, simply skip them.
IPA: Add forgotten declaration

A conflict between two patches was not resolved correctly
DP: Use the correct type for DBus boolean

https://fedorahosted.org/sssd/ticket/2057
UTIL: Create new wraper header file sss_endian.h

Some platform have header file endian.h and anothers have sys/endian.h.
We nedd to use conditional build to handle it correctly, therefore new header
file sss_endian.h was created.
CLIENT: Fix non gnu sss_strnlen implementation

last argument of function sss_strnlen "size_t *len" is output variable.
We need to increment value of size_t being pointed to by pointer instead of
incrementing pointer.
MONITOR: Move function declaration out of conditional build

Function monitor_config_file_fallback was defined inside of conditional
block "#ifdef HAVE_SYS_INOTIFY_H", but it was also used out of this block.
This patch move declaration of function before start of conditional build
section.
UTIL: Explicitly include header file sys/socket.h

We use constant AF_INET6 in util.c, but we do not explicitly include header
file sys/socket.h. This header file was indirectly incuded by another header
file netdb.h (netdb.h -> netinet/in.h -> sys/socket.h), but other platform can
have other dependencies among header files.
MEMBEROF: Remove temporary workaround