First-principles investigations of the ground-state and excited-state properties of BeO polymorphs