fix #54 close #21 close #22"

* 54: Add/remove meaning is buggy when adding word
* 21: Add 'type' attribute to definitions
* 22: Add 'sex' attribute to words
- several code enhancements
fix duplicate meaning name in NewDefinitionWindow