common: acquire/release internal input frame in base blitter for each frame

This is necessary in case derived blitters ref the input frame
(for example for motion detection in adaptive deinterlacing methods).
Without this, the internal_input_frame that was acquired at the beginning
is ref'd constantly, which causes the buffer to become read-only.
With this change, if the current internal_input_frame is already ref'd
(by the derived class for example), the code simply acquires another
internal_input_frame. This is safe as long as the derived blitter does
not constantly ref the input frames without unref'ing them again
(which usually is an error anyway).

Signed-off-by: Carlos Rafael Giani <carlos.giani@streamunlimited.com>