Add a method `hasprop` to Lua objects to check if a property exists

I need this in my ongoing efforts to rebase new-equipment.