xdata/xodtemplate: Fix processing of servicelists for serviceextinfo

This patch fixes two issues with service lookups for serviceextinfo
objects.

Firstly, we fix parameters to xodtemplate_create_service_list(),
which were previously warped so that we shipped the hostgroup_name
as the host_name and vice versa.

Secondly, we reset the master_service_list and service_map for each
iteration to make sure the serviceextinfo isn't set for more objects
than it should be. This second part only matters if there's more
than one serviceextinfo object (which is usually the case if one
uses such deprecated constructs).

Even though serviceextinfo objects are deprecated, we should still
handle them properly if we encounter them.

Original-patch-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Commit-message-by: Andreas Ericsson <ae@op5.se>
Signed-off-by: Ricardo Maraschini <ricardo.maraschini@gmail.com>
Signed-off-by: Andreas Ericsson <ae@op5.se>
xdata/xodtemplate: Clear the service bitmap between each serviceextinfo

Without this patch it would be impossible to assign multiple extinfo
objects to the same service, which was possible (although never
officially supported, since it wasn't documented) in Nagios 3.x.

Since it's (marginally) useful and the patch is literally a oneliner
that makes the extinfo code consistent with how escalations and
dependencies work, we may as well put it in (and if "That's what she
said", you need to find yourself a somewhat more passionate partner).

Signed-off-by: Andreas Ericsson <ae@op5.se>
xdata/xodtemplate: Fix the "not enough data" check for serviceextinfo

Since serviceextinfo objects need service_description and either
hostgroup_name or host_name, we should check for just that when
determining if we have enough data or not.

I'm not exactly sure what that check is doing there, since we will
fail with a hard error a few lines later if we can't find the extinfo
targets anyway, but I guess there's some perverted sense of continuity
in perpetuating insane legacies. Besides, people will probably whine
if their configs suddenly stop working, and I really don't want to
deal with that particular grief.

Signed-off-by: Andreas Ericsson <ae@op5.se>