Solvable Lie algebras of dimension ⩽4 over perfect fields