Electronic and magnetic properties of BN nanosheet superlattices: First-principles calculations