imagecache: check for null/empty url
httpc: fix the connection-close handling