A 17-year-old boy has been charged after a teenager was stabbed to death on a beach in North Ayrshire.