Dynamical Evolution of Young Embedded Stellar Clusters: Environmental Effects on the Formation of Planetary Systems.