added volume restore based on headset state

based on http://review.cyanogenmod.org/#/c/25527/

Change-Id: Ib62045e4c60aa265d6597ea7796fcbafcd4a4222