Add GetContext API and refactoring for minikonoha 0.3