strtok which is not MT-safe will be replaced by strtok_r

strtok is not MT-safe because it uses static variable to store last string.
it causes unexpected behavior when the scheduling is happened before
excuting strtok with 'NULL' argument. the static variable 'last' in the
strtok can not be guaranteed when the scheduled thread call the strtok,
also. instead, strtok_r should be used with the stack variable to store
last string.

Change-Id: Ia60835c2431d88098508b5c41f9e0edfa9710059
Media: Enable time lapse recording.

Change-Id: I8b5f32ee3a32a8c1e0db21a4c357518ec6d86bee
Author: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Signed-off-by: Tong, Bo <box.tong@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 47858 23657