Fixed the compiler define for FreeBSD usage too.
Removed duplicate code that already exists in ogfile.pas
Fixed lots of IFDEF issues to get the unit to compile under FreeBSD

- Hard coded IFDEF's to Linux only.
- Every strange IFDEF..ELSE blocks
- Adds template methods for FreeBSD (many not implemented yet)
Removed duplicate semi-colon at the end of a code line.
Removed code I have no idea what it is for. Makes no sense having it.
Adds missing uses clause. Some functions moved from ogutils -> ogfile recently
Fixes more IFDEF's hard-coded to Linux only.
fpgui/codegen demo: hooked up the OK and Cancel buttons to close form.