Added the documentation for Program structure. Added the test cases for the same. 

Re-created the pull request. More details here: https://github.com/groovy/groovy-core/pull/477