misc:posmgr: add new method getPositionByNum

getPositionByNum() returns the position indexed by a passed parameter without
popping it from the management stack.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
misc:runstat: abstract the profit management into an independent class

Since RunStat cantains kinds of attributes, it brings confusions to sustaining
work. So separate profit-related attributes into a new class and manage it
independently.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>