As the mastermind of the Bali nightclub bombings awaited execution, he published a jailhouse autobiography teaching others to follow in his footsteps.