Extend 'LeafRenderer' so that it can render 'Encodable' contexts
This patch was authored by @glbrntt and released by @0xTim.
Out of the box, the LeafRenderer offers a base API which can render
Leaf templates to a ByteBuffer. This requires the context to be provided
as a dictionary. With ViewRenderer conformance the LeafRenderer can
render View's using an Encodable context.
However, there's no middle ground: the LeafRenderer can't render
templates to a ByteBuffer using an Encodable context. Since
LeafEncoder is internal users can't make the extra hop from Encodable
context to dictionary to use the base API either. This functionality is helpful
when Leaf is used to render documents which aren't HTML.
As such this change adds an extension to LeafRenderer to render a
template to serialized bytes using an Encodable context.