Comparison of electronic structures and mechanical properties of MgAlB4, AlB2 and MgB2 using first-principles calculations