Make ubi handler function static

Signed-off-by: Stefano Babic <sbabic@denx.de>
Move general ubi functions in mtd-interface

Move functions to scan volumes into mtd-interface

Signed-off-by: Stefano Babic <sbabic@denx.de>
Make Handlers in LUA configurable

Signed-off-by: Stefano Babic <sbabic@denx.de>
Get rid of MAX_MTD_DEVICES

Drop static allocation for the MTD structure.
Call libmtd querying for the number of mtd devices
in the system and allocate dinamically the required
structures.

Signed-off-by: Stefano Babic <sbabic@denx.de>