Reflog buffer: support log margin and insert the reflog identifier

Actually only insert the numeric part of the reflog identifier. Support for displaying the log margin implements feature request #1161.