Use decode function instead of decoder property

This gets rid of the decoder property in favor of the decode function.
This syntax is easier because it means that we don't have to return a
read-only closure for decodable objects, and can define a simple
function instead.