krait optimizations and other fixes

Change-Id: I5e9da3a00f9b076dcfe2e4d697c61d53ee3f435d