Added a ring buffer log target to store the last N log messages.

This implementation is simple and somewhat inefficient (all messages use
the same amount of space). It was previously implemented more efficiently,
but the code was more complex, and this alternative was preferred.