Exploring the active galactic nucleus and starburst content of local ultraluminous infrared galaxies through 5–8 μm spectroscopy