Generalized Ginzburg-Landau theory for nonuniform FFLO superconductors