Ref T12450. Minor cleanup:
- setRoles() has no callers.
- getRoles() has no callers (these two methods are leftovers from an earlier iteration of the change).
- The hasRole() logic doesn't work since nothing calls setRole().
- hasRole() has only isreadable/iswritable as callers.
- The isReadable()/isWritable() logic doesn't work since hasRole() doesn't work.
Instead, just check if there are any readable/writable hosts. Host already inherits its config from Service so this gets the same answer without any fuss.
Also add some read/write constants to make grepping this stuff a little easier.