Fixes for compiling crypto in older trees

Some of these fixes needed to be made anyway. Note that older
trees will still need to have files / repos copied into them from
newer trees. Namely we need:
system/security/softkeymaster
hardware/libhardware/include/hardware/keymaster.h

Maybe others as I did not document very carefully what I was
pulling in.

Change-Id: I465fd1fbe228803ec02fba047b151f07ea13d5ca