Remove unused code

Also fix up logic for IsInherited and add test
Remove unnecessary headers
Merge pull request #253 from leapmotion/ref-cleanup

AutoConfig cleanup