Pure Javascript implementation for truly checking if the provided input is an URI. Based on RFC 3986.