Some basic improvements to the binlog-specific page fifo to hopefully get
reasonable scalabitily as a starting point.
The fifo is still protected by a global mutex, but some effort is taken to
reduce the duration a thread is holding the mutex.
Use a cyclic array instead of a linked list so pages can be looked up in
constant time. And cache allocated page objects to avoid repeated
malloc/free while holding the mutex.
Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>