Plugin framework enhancements.

Up until now the plugins for the fd/sd/dir are loaded semi at
random by the way they are stored in the plugin directory as
they are loaded in the order readdir returns the directory entries.

This is NOT how you want it in certain situations so from now on
you can specify in the fd/sd/dir a new keyword in the generic
daemon config resource named "plugin names" which is a list
which is seperated by a ':' and enumerates the plugins that
should be loaded in what order by a daemon. In this resource
you can define the following 'plugin names = "python:bpipe"'
which means in the fd load the following plugins:

- <plugin_dir>/python-fd.so
- <plugin_dir>/bpipe-fd.so

If you don't specify the plugin names then the old behaviour
will be used to load all plugins which match the pattern
*-<daemon>.so

Now we can order the way plugins are loaded there is also a
new flag to the generate_plugin_event() function which is named
reverse which is a boolean and if its set the plugins will be
called in reverse order that they are stored in the plugin list.

Fixes #196: Plugin framework enhancements.
Remove spurious daemon message on plugin load.

The plugin loading like to be somewhat chatty by issueing
daemon messages for every plugin loaded. Its more then enough
to issue this as a debugging message what was already done.
Streamline error handling.

When we fail in backup due to a version mismatch on the FD protocol
or in restore and verify for every failure we close the FD connection
if we opened that and return from the function. For backup we keep
the wait_for_job_termination() call as we really need that but as
we closed the FD connection already when we got a FD protocol version
mismatch we no longer hang waiting for something to be returned from
the FD which won't happen when the DIR detects a protocol version
mismatch.
Fix debugging output and print the right info.

We are printing the stuff we send to the SD not what we got back.
Conditionally enable VSS.

It only makes sense to adhere to the director requesting for VSS when we
have any File = statements in any Include block. So we now count the
number of File = statements in all Include blocks of the fileset and if
none are given (Plugins only for example) we ignore the request for VSS.
Implement plugin options passing.

Implement a new feature to pass plugin option as part of the restore process.
Most of the plugin options input was already implemented but for the restore
the options were never pushed to the file daemon. We should pass it to the
filed and raise a bEventPluginCommand event. This way a user can pass in extra
hints to the plugin for the restore process. Currently the plugin only gets
passed in the plugin options that were defined at the moment the backup was made.

The options defined by the user at restore time are passed before the actual
options saved at backup time are passed so the plugin should take care to ignore
any of the options passed in as part of the backup stream being restored
when it already got a override at restore time.

We increased the FD protocol number to 52 to be able to detect if the file daemon
understand the new protocol keyword.

Along the way we tweaked the layout of fileset traversal code somewhat. Added
some spaces and fixed the scoping of the variables somewhat. So you understand
what is going on. And fixed the comments in the filed plugin code.

Fixes #207: Implement plugin options passing.
Fail restore job when plugin options and no support.

When we need to send plugin options to a FD and it has a to low version
fail the restore job so the backup operator knows he needs to upgrade
its client (or disable the compatible option) of the target FD.
Always print loaded plugins.
Allow restoreoptions to be specified with restore.
Added usage to the plugin information block

Now the plugin information block also offers a
usage entry. That way, we can include a basic
info about the usage of the plugin in the plugin
itself.

Also, the status filed now shows extended information
about each plugin.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Tweak Makefile.in to always show what its doing.
Fix plugin install into right directory.
Upgrade all filed plugins to use fd_common.h
Cleanup plugins now we use fd_common.h
Only have bpipe-fd.c once and use it for UNIX and Windows.
Tweak plugin entry points layout.
Move plugins to new layout.
Add the new mssqlvdi plugin to the windows installer.

Fixes #199: Plugin to do backup of Microsoft Sql Server (mssql) server
Allow upgrade on windows

Now we check if bareos is already installed on the windows machine.
If so, we call the uninstaller of the previous version and install
ourselves afterwards.

The newer uninstaller keep the configuration files as the uninstaller is
called accordingly.

The dialogs for parametrizing the configuration and the dialog
for the config snipped are not shown, as the existing configuration
files will be used.

Still the user has to choose the same components during the upgrade
as were installed before.

fixes #225: Windows installer can't upgrade in place
Fix windows installer.

Explicitly do SetOutPath to the right directory for all sections
so files end up in the right directory and not in the last set output
dir. Also autoselect the install of the plugins. And some cleanup of
old debug and unneeded comments.