Processing of titanium foams using magnesium spacer particles