Two-dimensional metal dicyanamide frameworks of BeTriMe[M(dca)3(H2O)] (BeTriMe = benzyltrimethylammonium; dca = dicyanamide; M = Mn2+, Co2+, Ni2+): coexistence of polar and magnetic orders and nonlinear optical threshold temperature sensing