Close the display correctly after counting the number of screens
Close the display correctly after counting the number of screens

This patch adds support for calling countScreens in arbitrary places. Prior to
this patch one would end up with an open display for each call of the
countScreens function with would eventually mess up X. This patch ensures that
the display that is no longer needed is closed after the operation and thus
using the function without side effects.


reenberg/XMonadContrib,reenberg/XMonadContrib