Fix issues with buffer list handling and adjust-window-trailing-edge.
* buffer.c (Fkill_buffer): Don't inhibit quit around calls to
replace_buffer_in_windows and frames_discard_buffer.
* window.el (adjust-window-trailing-edge): If WINDOW is a
window-splits nil window, try to adjust it the Emacs 23 way.
(switch-to-prev-buffer, switch-to-next-buffer): If we have to
show a buffer from the frame's buffer list try to postpone
showing visible buffers. Reported by Juanma Barranquero.