Add border functionality and tests

The border API is rather simplistic, but this feels like a pretty good start.