kernel: use tail queues instead of lists for free/victim pages

This includes some clean up and reorder of functions (too much in a hurry to do
separate commits)
kernel: leave more room for main memory