When we have a valid BSR also use it.

When scanning volumes and we have a valid BSR we should really use it
for scanning SOS_LABEL and EOS_LABEL parsing and if they don't pass the
BSR filter they should be ignored.
Sync md5 and sha1 code to what others use.

We have stuff that could make some distributions scream that things might be
not fully opensource so we sync here to what other projects use e.g. a
fully public domain version of sha1 and md5. When things are compiled
using OpenSSL we even fall back to their implementation of md5 and don't
compile an own version at all. The rest of the code was changed to use
the new context names and the small change in the function names.
Refactor message printing.

- Drop fixed size arrays of 5000 bytes (arbitrary length)
- Code all message printing using POOL_MEM where it makes sense.
- Reindented wrongly indented functions.
- Don't use the new stuff using POOL_MEM from:
  - src/lib/mem_pool.c
  - src/lib/smartalloc.c
  - src/lib/lockmgr.c
Drop the duplicate hash table implementation.

Findlib has a hash table implementation for keeping hardlinked files
its cleaner to use the htable class we already have in the generic
library. So this patch adds support for binary keys in the htable class
so we can store there the combined inode/device key. We now also use the
hash_malloc of the htable class which allocates memory from a big memory
block so it should also scale a bit better.
Make consecutive tape reads more like writing to tape

No rewinding between each job! but if we need the same tape and
the device has the always open flag set the header cannot really change
so rereading it has little value. The Storage daemon should just
reposition the tape and start reading.

Fixes #322: Make consecutive tape reads more like writing to tape

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Enhance read device selection to respect media_type

When looking for a device to mount a volume that is to be read bareos
goes for the device the volume was last mounted in. If the original
device is blocked but there are other devices that can be used those
will not be selected and the job will fail.

Fixes #326: Enhance read device selection to respect media_type

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Update AUTHORS.