Multi-hypothesis Incremental Smoothing and Mapping for Ambiguity-aware Passive and Active SLAM