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 also more complex, and it was decided to go with this alternative.