Commit Briefs
flush imsg buffer before quitting
this ensures that all the pending messages, such as the two IMSG_QUIT, but limiting to them, are actually sent. This unbreaks save_session too.
simplify minibuffer/echoarea redraw
split the logic into two functions: one to render the echoarea and one to rendere the minibuffer (when it's active).