Fix crash on launch with unified key signing.

commit af674d74828c115c37827f9963f7b5fc56bcb8f9 introduced a regression that
caused the app to crash on the first launch after install (when creating a brand
new BKS keystore). The KeyManagerFactory member variable needs to be initialized
before any calls to addToStore().

closes #2693
use Locale.ENGLISH for ASCII, Locale.CANADA can mean French i.e. non-ASCII
remove all trailing spaces from .java (sed -i 's,[[:space:]]*$,,' *.java)