Make libdb optional dependency

Since the file book backend uses sqlite as its summary, the libdb is
needed "only" for migration of old data.