Use URI::regexp to validate HTTP and HTTPS URLs in entries, instead of our own regex.
Use URI::regexp to validate HTTP and HTTPS URLs in feeds, instead of our own regex.
WIP: transform relative entry URLs into absolute URLs.
Fixed url-encoding and converting to absolute URLs for entry URLs.

Note that we do a to_str of the URL before passing it to URI.encode. This is because of a regression in Rails in which sometimes passing certain strings to URI.encode causes this error:

  "undefined method `each_byte' for nil:NilClass"

However it seems invoking to_str just before passing the string to URI.encode seems to be a workaround. Something related with the handling rails is doing of html-safe strings, according to some github and stackoverflow comments. I haven't investigated a lot, but the workaround works for now.
URL-encode illegal characters in feed URLs and fetch URLs before saving in the db.