Cache the result of jidprep()

Avoid doing repetitive calculations, if we call jidprep() on the same JID multiple times