Refactor mini-keyctl and split a static library

Test: mini-keyctl still works in command line
Bug: 112038744
Change-Id: I08006d8befa69e4bf416a2bed9e1813725877147
8 files changed