refactor suspend/resume demo

use Wake API to control the client. Closes issue #586