Bug 858158 - [keyboard] document prediction algorithm and make it tuneable