[2/2] User configurable safe headset volume

* Add an user configurable option to
    enable/disable safe headset volume.
* Add restore volumes after boot and when a headset is plugged.

[2/2] 用户可配置的安全耳机音量

* 添加一个用户可配置的选项
    来启用/禁用安全耳机音量.
* 添加耳机插入时, 设备启动后恢复音量.

[1/2] in platform_frameworks_base

Thanks to CyanogenMod for the original implementation.
感谢CyanogenMod原创实现此功能.