Heartbeat and timeout completed

Complete the hearbeat mechanism, any stdout from spawned child will
trigger a heartbeat, the heartbeat will update the larva's lastHeartBeat
timestamp. If the lastHeartBeat + timeout < now, the larva is regards as
"no response", and will be killed