Fix getCapabilities on maps with no layers

Fix to print GetCapabilities xml element in a map with no layers. 

Now if you set check_all_layers to MS_TRUE it'll still look into the map for the enabled request even if there is no layer.