Charging questions, current limitation and voltage
What Apple, Samsung, Motorola and other phone manufacturers call "charger" aren't actually chargers at all - they're power supplies. The actual charger circuit is embedded into the phone.

So as for your question as to what limits the current consumption of charging the battery - it's the battery charger. And it's much more complicated than a simple resistor. Especially for lithium chemistries. This is because lithium based batteries (lion, lipo, liFe) tend to overheat and burn/explode when charged or discharged too fast.

I strongly advise you not to try charging a bare lipo battery using a simple regulator such as the LM317. There are chips designed specifically for charging lithium batteries such as the MAX1555 that prevents the battery from overheating.

For charging a phone however, all you need is to supply the right voltage with enough current. Doable with the LM317.