I can advice to use XMPPFramework for iOS. It is open source project that implements XMPP protocol.
As it based on XML format it's easy to extend functionally by adding custom tags for storing any addition data you need.
XMPP protocol has implementations for most of platforms (client- and server-side).
For server side you could use Openfire.
Answering on your questions:
- No, Apple doesn't provide specialised solutions for chat apps.
- XMPPFramework based on sockets (similar to push notifications mechanism).
- XMPPFramework provides mechanism for storing chat history in local database (based on CoreData). Also you could load history from server.