bash-completion: handle sqlite errors

Because 'available' table creates when sack is requested we can guarantee
that packages.db will contains 'available' table when file exists.

'installed' table creates when transaction runs, so we can't guarantee if
packages.db exists 'installed' table will also exists.

We will check if table exists we will load it.

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>