Cleanup of extract_opts.py

Moved global variables to the top.
Removed once used variables
Used option type definitions in OPT_TYPES

Change-Id: Ia0bf39933bac84dbf432e6b4590ceb2527e6889c
Merge "Cleanup of extract_opts.py"
Merge remote-tracking branch 'citrix/master' into build-temp