Allow writes from scripts called by AOF loading in read-only slaves.

This fixes issue #1163