Update cgi.pas

Структурировал.
Merge pull request #2 from SomeFire/patch-1

Update cgi.pas