Samsung's fourth-quarter profit increased 52%, to its highest in four years, due to the demand for memory chips.