Add a copy of Monit's fill() function.

Signed-off-by: Thiago Farina <tfarina@chromium.org>