Add if block_given? to yield in AR callback statements

This commit adds an if block_given? qualifier to the ActiveRecord
callbacks. If no block is given and these functions are called,
a JumpError is raised. This fixes that issue.