Hybrid and electric power systems for agricultural machines