After almost a decade of recession, the Spanish capital is back on its feet thanks to foreign investment and a flourishing tech scene, says Marisa Cannon…