tools: add freezer/unfreezer, move minimum api to 17 again

increasing minimum api to 17 again until full compatibility to older
api's is ensured.

add freezer and unfreezer, originally done by h0rn3t.
fragmentified and modified for our purpose.

Change-Id: Ibff1f9873fdda6542c53750ce5bfdc09f2bcbb7e