fixes #195. modified query to always left join on director/instructor/learner-join tables instead based on roles conditions.
code cleanup: free query result after data processing.
fixes #201. added unbeforeunload event handler that checks for dirty state.
fixes #200. added onbeforeunload event handler to learner group management page that will run a dirty model check.
Merge pull request #237 from stopfstedt/bug195

fixes #195
Merge pull request #235 from stopfstedt/bug201

fixes #201.
Merge pull request #236 from stopfstedt/bug200

fixes #200