Fix variable overwrite in build_put_params

Before this patch, the for loop at the bottom of `build_put_params`
would overwrite the passed in value variable, resulting in spurious
log messages:

    'You supplied a value and statistics for a metric. Posting
     statistics and not value.'

I've changed the variable name from value to val to prevent the
overwrite and stop the spurious log messages.
Added tests for the previous CloudWatch patch.