SetupDVDChapters: Various fix, cosmetics and clean-ups.

- Fix compilation
- Make the GetTitleInfo function static
- Use ULONG and CString for consistency
- Check that the program number seems valid.