Add managedsave tests after dompmsuspend; Fix some bugs for nagative tests.
Add save/restore tests after dompmsuspend; Fix some code bugs.
Merge pull request #296 from rbian/dompmsuspend-managedsave

Add managedsave tests after dompmsuspend.