* Wrapping all headers that are in agi_pre.h with AGI_PRE.
* Sorting alphabetically.
* Same operation as r3515.
Note: This is broken when precompiled headers are not in use, I'll fix that after this commit so the two changes don't get jumbled up.
Originally committed to SVN as r3525.
Also fix a bug in the block cache where it wasn't the sorted order of the macroblocks by access count that was used in determining which ones to kill off.
Originally committed to SVN as r3415.