Electronic structure of Mg2FeH6 and Mg2CoH5 hydrides and binding role of hydrogen in them