HAVANA — In 2008 Raul Castro took over a country where most people couldn’t own computers or cellphones, leave without permission, run most types of private businesses or enter resort hotels. Castro set about re-engineering the system he had helped create and Cuba opened dramatically over his decade in office. But when Castro steps down as president Thursday he will leave his successor a host of problems that are deeper than on the day his brother Fidel formally handed over power. Cuba has nearly 600,000 private entrepreneurs, more than 5 million cellphones, a bustling real estate market and one of the world’s fastest-growing airports.