Refactor restore object handling.

- Send also FT_PLUGIN_CONFIG restore objects as part of the
  send_restore_objects() function.
- Send override plugin options before sending any restore objects.
- send_restore_objects() function got two extra arguments that allow you
  to pass a JobId and a boolean if it needs to send the global restore
  objects or the ones specific to the given JobId.
- On an incremental and differential backup we lookup the previous Job on
  which we are based and lookup the restore objects created by that Job
  and send those to the file daemon so they can be used as information
  on what config the previous backup either used or generated as
  information for a next backup.
Use normal read/write API instead of fread/fwrite.

Attribute spooling for whatever reason uses fread/fwrite for
reading and writing spool files but it also has all kind of
other low level interface calls. See little sense in using
stdio buffering for writing attribute spool files.
fixes some warnings from qa.debian.org

See https://packages.qa.debian.org/b/bareos.html:
file permission of the copyright file,
file permission of the logrotate config file,
remove automatic password helper file,
do not suggests dds2tar, as it is only for DAT tape drives and not directly used by Bareos.

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
do not install files as conffiles in /etc/bareos

If we install those files as conffiles, we are not allowed to replace
passwords etc in them.

This change installs the files into /usr/share/bareos-common by default
and uses them templates for the generated files in /etc/bareos in postinst.

Ideally, we would register them with ucf and merge the newer versions in
the future, but this task is left to future-me or someoneelse who has the
needed time.

Closes: #767819

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
store Debian config templates in directory configured by --with-configtemplatedir

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Rebuild configure.
Tweak attribute insert code.
clearified description for bareos-database-common

Closes: #768606 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768606)
Thanks: Davide Prina