What are the functions of the placenta and umbilical cord during pregnancy?