The Bitcoin blockchain has proven to be remarkably resilient in its decade-plus history. Here’s what keeps it safe from attack.