Emulate spacebar to fix scrolling in the web viewer in Firefox

This is a continuation of PR #3497, and it implements a workaround to make sure that scrolling using the `spacebar` key works in a predictable way in all browsers. This patch tries to, as closely as possible, emulate the behaviour in Firefox, since that is where scrolling using the `spacebar` key currently doesn't work in the web viewer.

To make sure that this patch doesn't unnecessarily interfere with already working cases, it only applies to the web viewer *and* builds created with `node make generic`.
This means that for the Firefox addon and the Mozcentral version (and also the Chromium addon), this workaround won't be used since it's not needed in those cases. 

Fixes #3498.

PS. I initially tried solving this by creating a `keydown` event to simulate `Page Down`/`Page Up` being pressed, since those keys already works. Unfortunately this didn't make any difference, hence the reason for the current workaround.