Funeral of Pope John Paul II takes place