mtd: Add sysfs attributes to expose the ECC stats fields

These new sysfs device attributes allows to retrieve the ECC
and bad block stats by poking a sysfs file, which is often more convenient
than using the ioctl.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
(cherry picked from commit 161f34dec20daa93771b9f9463dc4b64e998ea47)