Extract form utilities and move to main beego. Refs astaxie/beego#835.

Counterpart is astaxie/beego#843.