notification function: rt_err_t (*tx_complete)(rt_device_t dev, void
*buffer) with buffer pointer
DFS: add dfs_file_flush prototype in dfs_file.h
log_trace: fix the memmove use

The first parameter of memmove is the dst, not src. Besides, fix the
wrong move size.
Merge pull request #169 from grissiom/log_trace-fix

log_trace: fix the memmove use
Merge pull request #168 from grissiom/dfs-fix

DFS: add dfs_file_flush prototype in dfs_file.h
kernel: add RT_DEBUG_IN_THREAD_CONTEXT

In thread context means: 1) the scheduler has been started; 2) not in
interrupt context. It is more stronger than RT_DEBUG_NOT_IN_INTERRUPT.
With this commit, you will catch the error on situations like taking
mutex before scheduling instead of crashing on NULL pointer reference.
Merge pull request #170 from grissiom/rtt-next

kernel: add RT_DEBUG_IN_THREAD_CONTEXT
kernel: fix compiling error when RT_DEBUG is not defined

Define RT_DEBUG_IN_THREAD_CONTEXT when RT_DEBUG is not defined.
Merge pull request #172 from grissiom/rtt-next

kernel: fix compiling error when RT_DEBUG is not defined
kernel: use skip list to implement timer list

Skip list is a "random" data structure that in high possibilities it
would get O(log(N)) time complexity in inserting while the old list get
O(N). Forthermore, when set RT_TIMER_SKIP_LIST_LEVEL to 1, it will just
the same as the old double linked list, both in time and space
complexity.

Benchmarks shows that when RT_TIMER_SKIP_LIST_LEVEL is 3, the average
time of random insertion of new timer is about 2 times faster than the
old timer when there are 100 timers and 3 times faster when there are
200 timers.

However, it restores the deprecated funcion rt_system_timer_init. BSPs
must invoke it upon system startup.
kernel: mutex could only be released in thread context

Mutex has the idea of ownership, only the thread which owns the mutex
can release it. So rt_mutex_release could only be called in thread
context.  Add a debug guard to it.
simulator: add createdef.py to generate def file for VS

Now we can get rid off Mingw to create def file. To create def file, one
should run:

    scons --def

in the bsp/simulator.
Merge pull request #174 from grissiom/rtt-next

kernel: mutex could only be released in thread context
Merge pull request #175 from prife/simulator

simulator: add createdef.py to generate def file for VS
simulator/jffs2: remove _TIME_T_DEFINED when built by VC++

_TIME_T_DEFINED was pre-defined in order to build jffs2 with VC.
While it may cause many side effects.
Merge pull request #178 from prife/jffs2

simulator/jffs2: remove _TIME_T_DEFINED when built by VC++
Merge pull request #162 from joyhope/master

UART DMA tx_complete() with buffer information
Merge pull request #161 from aozima/pulls

make sure the device is in STREAM mode when used by rt_kprintf.
Merge pull request #173 from grissiom/new-timer

kernel: use skip list to implement timer list
finsh: refactor the control key handling

We split the history handling form the key handling. So we could handle
the direction key even if the history is disabled. As a "side effect", I
also remove the unnecessary "use_history" bit.