[pinyin] various fix

1. don't delete phrase when there's no phrase.
2. fix a enum num compare warning
3. save auto phrase if part of phrase is selected.