D$^2$NeRF: Self-Supervised Decoupling of Dynamic and Static Objects from a Monocular Video