add truncatedState helpers and use in loadState
add truncatedState helpers and use in loadState

This was not done previously. The handling of truncated state is
still a bit sketchy but will cleaned up further.

cockroachdb/cockroach,maxlang/cockroach,maxlang/cockroach,sunya123/cockroach,petermattis/cockroach,vaibhavarora/cockroach,paperstreet/cockroach,maxlang/cockroach,petermattis/cockroach,vivekmenezes/cockroach,cockroachdb/cockroach,veteranlu/cockroach,paperstreet/cockroach,petermattis/cockroach,veteranlu/cockroach,petermattis/cockroach,vaibhavarora/cockroach,paperstreet/cockroach,glycerine/cockroach,vivekmenezes/cockroach,glycerine/cockroach,glycerine/cockroach,glycerine/cockroach,paperstreet/cockroach,vaibhavarora/cockroach,vivekmenezes/cockroach,sunya123/cockroach,vaibhavarora/cockroach,maxlang/cockroach,sunya123/cockroach,cockroachdb/cockroach,maxlang/cockroach,vivekmenezes/cockroach,arjun4084346/cockroach,vivekmenezes/cockroach,arjun4084346/cockroach,glycerine/cockroach,vivekmenezes/cockroach,vaibhavarora/cockroach,arjun4084346/cockroach,vivekmenezes/cockroach,sunya123/cockroach,paperstreet/cockroach,veteranlu/cockroach,arjun4084346/cockroach,arjun4084346/cockroach,cockroachdb/cockroach,paperstreet/cockroach,cockroachdb/cockroach,sunya123/cockroach,cockroachdb/cockroach,glycerine/cockroach,veteranlu/cockroach,petermattis/cockroach,veteranlu/cockroach,sunya123/cockroach,maxlang/cockroach,veteranlu/cockroach,paperstreet/cockroach,veteranlu/cockroach,glycerine/cockroach,sunya123/cockroach,glycerine/cockroach,petermattis/cockroach,arjun4084346/cockroach,cockroachdb/cockroach,arjun4084346/cockroach,maxlang/cockroach,maxlang/cockroach,arjun4084346/cockroach,cockroachdb/cockroach,vivekmenezes/cockroach,vaibhavarora/cockroach,veteranlu/cockroach,paperstreet/cockroach,petermattis/cockroach,sunya123/cockroach,vaibhavarora/cockroach,vaibhavarora/cockroach,petermattis/cockroach