Four years after it announced its intention to get out of the rail business, Finmeccanica said on Tuesday it had signed to sell its rolling stock and signals units, cutting its debt by 15 percent and leaving it as a dedicated defense, security and aerospace company.