main_nogui: move callbacks under main()
main_nogui: move callbacks under main()

It's more readable to have code-flow weakly follow layout.

rjw57/openni-skeleton-export,rjw57/openni-skeleton-export,rjw57/openni-skeleton-export,rjw57/openni-skeleton-export