Study looks at best and worst states for teachers