The problem is subtle. You want a way to clear the contents of a text field without selecting the contents first, because selecting them will clobber your selection buffer's contents. In my opinion, this is a design flaw in whatever UI toolkits are used on Linux. Only manually selected text should be copied to the X primary selection, not text that is selected incidentally as a result of a non-text-selecting operation (e.g. clicking in a text field). But anyway, how about a couple of workarounds?
If you don't mind adding extra toolbar buttons, you can try the pastego extension: But I'm not sure it works with the X selection.
Another option is to install one of the many extensions that add clear buttons to the location/search bars, such as Clear Fields, DiggiDig, ClearURLButton, or xclear. Then, you just hit the clear button, and the text field is empty, ready for you to middle-click your own text into it.
Lastly, you can try clickngo, which does more or less exactly what you want, and seems to work in FF 3.5, despite the lack of a recent version bump.
Edit: I just remembered a command-line solution to this problem: surfraw. Here's the beginning of the package description:
Surfraw provides a fast unix command line interface to a variety of
popular WWW search engines and other artifacts of power. It reclaims
google, altavista, dejanews, freshmeat, research index, slashdot
and many others from the false-prophet, pox-infested heathen lands of
html-forms, placing these wonders where they belong, deep in unix
heartland, as god loving extensions to the shell.
Basically, it lets to do google (and other) searches from the command line.