Add a function to retrieve current brush extents.

I need this for an application I'm working on. However, this can also serve as a
starting point for fixing the brush resets on resize. I'll have a look at that
soon.

**NOTE**: I'll rebase this commit master before the merge and create a new pull request. I'm working on multiple fixes/features at the same time.
@syntagmatic See the comments in the issue I mentioned. This comment can go. I'll update this merge request tomorrow. So, please wait a bit with merging this one. (Unless you want obsolete comments in the code =;)