JSONAlchemy: improve tests and bug fixes

Signed-off-by: Esteban J. G. Gabancho <esteban.gabancho@gmail.com>