Optical absorption spectra of metal oxides from time-dependent density functional theory and many-body perturbation theory based on optimally-tuned hybrid functionals