Licensing and some cleanup

* 3-clause BSD license has been chosen to be compatible with GD (BSD-like)
* srand() in main()
* removed unused variables from main()
* newlines
* private captcha helper functions hidden