Custom scalar function interface redesign

@Sean1708, what do you think of this? I haven't quite finished the docs, but they're pretty much ready. Wanted to get your feedback/thoughts. My main idea was wanting a way to create *and* register a function with one macro/call, and that involved a little more machinery than I thought. I uses pretty much your same original code, just moved around a bit.