fix jruby installation issue on Arch Linux

The most significant issue is actually done by @mpapis, that allowing java provider to be fallback as openjdk7 > jdk > jd6, so do jre providers. (But I forgot to mention this in the commit message, oops)

And I've added Arch specific logic for package check (available/installed) using pacman.

Additionally I removed one line of unnecessary code from a generalized function.