PepsiCo has apologised for an online Mountain Dew ad that has been criticised for being racist and portraying violence against women.