Online Mapping and Motion Planning Under Uncertainty for Safe Navigation in Unknown Environments