Communication-Driven Localization and Mapping for Millimeter Wave Networks