A Co Tyrone schoolteacher who was “completely obsessed” with a pupil who he sexually assaulted has avoided jail.