Cleanup old buffers to free memory.
Keeps buffers for:
Sets file.buffer = null for all other files to free memory.
2. Sort by last_viewed (most recent first)
3. Keep top 10, clear buffers for the rest
This is called automatically before creating new buffers to prevent unbounded memory growth.
| current_file |
The file currently being accessed (always keeps its buffer) |