Add index on state column

We want to add indexes on the newly introduced state column on the table namespaces, based on its use as we develop on issues in Iteration 4: Replace legacy state checks with n... (gitlab-org#17958) and get the qweries where this column is used.

Edited by Aakriti Gupta