Man accused of threatening Andrew Mountbatten-Windsor allegedly searched online for information on weapons and members of Royal family