Automated assessment and teaching of surgical skill