jim.c: fix some dict/list shimmering issues

Only do fast dict->list conversion if there is no string rep
When converting list->dict, generate the string rep of a shared list to avoid
loss of info when converting to dict.

Also add a relevent test to dict.test

Signed-off-by: Steve Bennett <steveb@workware.net.au>