Make component state retrieval into its own method

Without this commit, the code for component state retrieval was shoved
forcefully into the `mk_property_methods` call. This made testing this
piece of code and maintaining it very difficult.

This commit breaks the state retrieval code into its own instance
function that is then called from the functions created by
`mk_property_methods`.