releasetools: Add support for MTD devices

Added device type checks in few functions to call necessary update
script commands.

Change-Id: Id7ddaecfe65eaf32867967b38ab952cf820f806b
Merge "releasetools: Add support for MTD devices"