Javascript implementation for truly checking if the provided input is a valid URI, Based on RFC 3986.