json: add prepare_block()
support global properties

Every properties outside a block will be considered global, and will be
applied to every block, unless the block overrides the corresponding
values.

e.g. This config will set the color to blue and the interval to 5sec as
default for every block:

    interval=5
    color=#0000FF

    [block1]
    command=date +%T

Fixes #5