utils: Move DynamicBuffer from encoding folder to util.

Change-Id: I0ff9b17abf427c767ade6b145be3beca517afbc2