[generic.c] Routines for "generic" implementations of some messages.

 * generic_ncpaint() to paint theme-enabled borders (as of WM_PAINT).
 * generic_erasebkgnd() to paint control background according to the theme
handle (WM_ERASEBKGND).

Grid and Tree-list view now uses these new functions instead of their own
implementation.