Shell structure of Ti and Cr nuclei from measurements of g factors and lifetimes