URL-encode ids passed to Type::deleteById()

Type::deleteById() builds a URL directly from the id, so an id containing a '/' will fail unless the id is URL-encoded.