modelize_property: add readonly annotation on attributes

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add base_attr_readonly

Signed-off-by: Jean Privat <jean@pryen.org>