check whether costmap is initalized before publishing

In the current code, its possible for Costmap2DROS::updateMap() to not actually update the map (for instance when it doesn't have a robot pose yet). in this case, Costmap2DROS::mapUpdateLoop() still tries to publish the costmap, but the sizes are garbage (LayeredCostmap doesn't initialize the size of the map until an update is done). this can cause a segfault, because Costmap2DPublisher tries to iterate over the costmap using the garbage map sizes provided by the layered costmap.

this pull request fixes the problem by checking whether the LayeredCostmap is initialized before trying to publish it.