spec: test for allowed URI schemes in type

Previously we were checking that an invalid URI scheme raised an error
but we weren't checking if those that we expect to work actually work.

This commit adds three tests that take care of that omission.
provider: use mk_resource_methods instead

By using `mk_resource_methods` the property getters and setters are
automatically created for us.

Since we have read-only properties we alias the setters to the new
read_only function and remove the old READ_ONLY constant which is no
longer needed.

Additionally we need to define the expired getter because the getter
created by mk_resource_methods doesn't seem to like it when the
property_hash returns false as a value.