Some cleanup in TermSqlIndex

Change-Id: I783cec335bba5eac0f47cde6fc621e70bc610e09