Lyman break and ultraviolet-selected galaxies at z similar to 1-I. Stellar populations from the ALHAMBRA survey