src/xdisp.c: Use same test in `redisplay_window` and `prepare_menu_bars`
This consolidates the test made in those two functions so as to make
sure they agree whether a window needs to be redisplayed.
At the same time, change this test so it uses the window's point
rather than the buffer's point when comparing to `w->last_point`.
* src/xdisp.c (needs_no_redisplay): New function, extracted from
`redisplay_window`.
(redisplay_window, prepare_menu_bars): Use it.
* src/window.c (window_point): New function, extracted from `Fwindow_point`.
(Fwindow_point): Use it.
* src/window.h (window_point): Declare it.