First-principles study of electronic structure and magnetic properties of SrTi
1−
x
M
x
O
3
(M= Cr, Mn, Fe, Co, or Ni)