core: Add getProp() and setProp() methods

Imported from VisualEditor core.

Change-Id: If99eb7732e6d63c09f75d2207936a94ac98c539f