Internal error with period overflow

When statistics queried with large period value the overflow
causes error 500. This patch converts the overflow error to
ClientSideError which is returned as 400 bad input error

Change-Id: Iacf89c75428713a151fbe81aa1601df63785f942
Closes-Bug: 1396223
Database.max_retries only override on sqlalchemy side

Currently, the max_retries parameter will be override in
get_connection_from_config function. But it will be used
later in safe_mongo_call function.

Since the override of max_retries only need on sqlalchemy
side, this patch move the override from get_connection_
from_config to storage.impl_sqlalchemy.Connection.__init__
and make sure max_retries can be used on mongoDB side.

Change-Id: I83f35c886bc8b7299c1efd7297fdbc980214567f
Closes-Bug: #1395972
Add encoding of rows and qualifiers in impl_hbase

Currently, in impl_hbase we dump only cell values.
Respectively if row or qualifier contains non-ascii symbol
exception is raised.
This patchset adds encoding/decoding for rows and qualifiers.
It uses encoding instead dumping for backward compatibility of
rows and cell keys in tables.

Change-Id: Id238d38b4ce1f91d9e5e760856e27c5f6eb0685c
Closes-bug: #1350826
Merge "Add encoding of rows and qualifiers in impl_hbase"
Merge "Internal error with period overflow"