Import ok'd parts of ALAC encoder from GSoC repo.