Bug 885678 - Tests for renderUI in keyboard

This adds unit tests around the renderUI code. Issues found here:

1. The regression that we found around updating _keyArray is an already existing issue. It has just gotten worse after the fill up space patch. The test currently fails against master.
2. Keys with a ratio of 2 don't scale correctly