caskbench: Group the skia and cairo test determination codes

Also improve error messages so they're not redundant
caskbench: Fix bounds checking on string variables

Since we're going to concatenate two strings, it's not enough to simply
check the length of the second string.  If it were of length
MAX_BUFFER-1, then the check would pass but concatenating it with
"cairo-" would then result in a MAX_BUFFER+5 length string which would
be out of bounds.
Fix whitespace
canvas_perf: Run the rect testcase
Add several line tests