Port TinyAES-128 to be thread safe.

Signed-off-by: Anton Lundin <glance@acc.umu.se>