tests: Add pseudorandom number generator

This commit adds custom pseudorandom number generator in bash which can
have a seed set for making repetitive tests. The generator is
thread/process-safe ($RANDOM was failing in functions launched in background)
for making repetitive tests. Tests that are using a random generator were
made repetitive.

Closes #98
mount: Fix memory leaks and uses after free

Fix few small leaks and invalid uses of FUSE data structures.
Allows passing valgrind memcheck cleanly.