Understanding the ward environment: factors determining medical students’ ‘ward smarts’