only use RINIT for memory storage
start to fix w32 build script and normalise HAVE_ defs
add memoize_has_storage() and fix test skipping