A Poincaré-Birkhoff-Witt theorem for quadratic algebras with group actions