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
Merge "Internal error with period overflow"