More than 250 passengers on board a ferry that ran aground off the South Korean coast have been rescued, according to the coastguard.