The Allegretto-Piepenbrink theorem for strongly local Dirichlet forms