imagej-omero: fail the script if curl gets a 404

Normally, curl still returns a 0 exit code upon encountering an HTTP
404. This is undesirable; we pass the -f flag to fail out in that case.
imagej-omero: make download a subroutine; fix URLs

Rather than repeating code, let's be DRY and make the download function
into a subroutine.

This change also fixes several incorrect URLs of various components.

Hopefully the installer script is finally in a working state now!