From my experience I've had the best luck just using
ffmpeg from the command line. It's not as hard as it sounds. I'm not sure what formats iMovie will take, but it's probably a safe bet to assume it can handle Apple's Quicktime .mov format. You'll want to run ffmpeg with a command like
ffmpeg -I [inputfile.avi] -b 1000 outputfile.mov
By default it'll output lossy, but with the bitrate set to 1000 there really shouldn't be any noticeable ugliness. (And if there is, just bump it up to 2000.) If you need lossless (or the default codec isn't compatible with iMovie for whatever reason), you can set the video codec with the -vcodec flag, followed by a codec. I'd opt for "qtrle" as the codec in that case, as it'll be smaller than uncompressed video. The command would look like
ffmpeg -I [inputfile.avi] -vcodec qtrle outfile.mov
The filesize will also be huge, so unless you've got gigabytes to spare I'd just go for high-bitrate lossy. (A 2 minute video I was testing was 7MB at a bitrate of 500 vs. 544MB using qtrle, just as a benchmark). Hopefully this will work better than Handbrake has been.