kmsconfcontroller: Do not use temporal file.

Some events were causing unexpected critical/warnings because events of kind
segment can't be added in temp file of queue queue2-2

Change-Id: I056dc0a2c344d05c127abd8f3e0cd2dafab47e41
kmsconfcontroller: Set proper format to queries

Change-Id: Ic7cf3525ea6aea97a96c3f35a2b886470768e34b
kmsconfcontroller: Use default query function when no other criteria matches our ones.

Change-Id: I3560d2728878669559cc5f9055a31ab15f67268b