implement signal with message, fix a bug in sync_engine constructor

@thinxer, please test the new signal API.