Pentaquark $\Theta^+$ in nuclear matter and $\Theta^+$ hypernuclei