Respect the terminal's default fg/bg colors if supported

curses by default doesn't use the terminal's default fg/bg colors as outlined in the default_colors man page. This patch checks if the terminal supports ISO 6429 color and if yes, uses the default fg/bg color pair. If not, it uses the COLOR_WHITE, COLOR_BLACK color pair like before.

I hope I got the tabstops right now.