spearmint: Add header to demo files and change demo file extension

Add header to demo files containing identifier, header size, protocol, record start and end time strings, and length of demo in milliseconds.
The header size in file allows adding more data to header in the future and still play newer demo using older engine versions (assuming the protocol doesn't change).

Allow cgame to get list of demos using "$demos" for extension, allowing engine to change it without cgame caring. Also strip extensions from demos list, because no where in cgame needs it.
spearmint: CGame API: Add CG_GETDEMOFILEINFO

Allows checking if demo is valid and get info to display in UI.
Clear referenced paks when disconnecting

After playing Team Arena, if you switch to Q3A and try to play a demo with
cl_allowDownload enabled it would print "Need Paks: blah blah" and not play the demo.
spearmint: Fix starting a demo while running a server
Merge remote-tracking branch 'ioquake3/master'